autotest: Detect hostapd startup failures

Detect when hostapd fails to start because of invalid configurations.
For instane, HT40+ on channel 153 causes hostapd to start but later
fail during interface configuration.  With this patch, this sort of
failure is detected correctly.

This should also eliminate some flake for HT40 tests since hostapd
starts up with a scan of neighboring channels (presumably to figure
out how polite it needs to be to non-802.11n clients).  This causes
the first beacons from hostapd to appear significantly later than
the start of DUT WiFi scanning.

While here, use the hostapd options to daemonize itself and log output
to a file with timestamps.  Clean up that file before hostapd start.

TEST=A hostapd instance asked to configure itself on channel 153 with
HT40+ will fail.
BUG=None

Change-Id: Ib91cee871ba5f405940dd5f0b23c53f4bb884eb4
Reviewed-on: https://chromium-review.googlesource.com/169871
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
1 file changed