Captive portal: regroup hardcoded http response codes.

This patch regroups various hardcoded http codes into well defined
constants. This reduces risk of errors and makes the captive portal
logic clearer.

This patch also fixes the logging when a captive portal detection
probe fails, to take into account https ssl handshake failures: for
well-behaved portals it is expected that the https probe will fail,
however the error message was written before the introduction of the
https probe and had become ambiguous.

Test: built, flashed, tested manually with various portal networks
Bug: 36532213

Change-Id: Ia15f77e268cb414816fc52f92835289f9a9ce92b
1 file changed