Refactor NetworkSecurityPolicy to be pluggable

This allows us to keep the logic for the NetworkSecurityPolicy in the
framework instead of in libcore.

(cherry-picked from commit 7a6f1687cfa0929e68ac7813b7432259b8088b4d)

Change-Id: I4bf494f79c27729cb17d93d90a91319492270ce9
2 files changed