This change address api council review feedback for ag/33705589,
which includes:
1. Mirror `@Transport` annotation in NetworkCapabilities to
the NetworkTemplate class, because such annotation is
not visible to NetworkTemplate class.
2. Add @Transport annotation for the APIs.
3. Add @throws in the javadoc.
Flag: com.android.net.flags.netstats_transport_type
Test: m
Fix: 424088371
Change-Id: I2c3ed5e1abc6d647bbb5af99446e3d75ed167f05