Try OPNS/OLAC before PPTP/L2TP

When the PPTP/L2TP path was introduced, support for the features was
determined simply by opening a socket with the appropriate upstream
socket protocol types. However, it was later found that older kernels
had bugs in their PPTP implementation which silently broke Android's use
of the ppp tunnel, and must not be used.

Unfortunately, some devices ship with CONFIG_PPTP or CONFIG_L2TP enabled
*in addition* to the CONFIG_PPPOPNS or CONFIG_PPPOLAC Android
extensions, but lacked the upstream fixes to PPTP/L2TP. This meant that
mtpd would prefer the broken PPTP/L2TP features over the working
OPNS/OLAC features.

On newer kernels, which do not have broken PPTP/L2TP implementations, we
have explicitly removed the Android OPNS/OLAC changes. This means even
if we "prefer" the deprecated method, it will never be used, and
PPTP/L2TP will always be used instead, which is what we want.

This change maximizes compatibility with older broken kernels without
sacrificing use of the modern path on kernels without the bugs.

Bug: 116424816
Change-Id: Ic64426c76135b717a1da7013bc03501c03d19a6b
2 files changed