[Thread] add Thread aconfig_declaration to java_sdk_library

This commit also moves Thread flags to Connectivity/common to ease
maintenance.

Ignore-AOSP-first: cherry pick of aosp/2971692
Test: m framework-connectivity-t
Bug: 317290555
Change-Id: I50f3d3b8205a5a9ee8154a649318a2c175edbb71
5 files changed