wifi: finetune auto-upgrade behavior

When there are only legacy networks and transition networks,
the legacy type is selected for transition networks to
have better roaming behaviors.

In other cases, try to use the higher security by default.

Bug: 186076064
Test: atest FrameworksWifiTests
Change-Id: I52769d83ce4f56024fa2de485d74c60062b0dab8
20 files changed