[autotest] Add sudo -n option to avoid password prompt.

Also add a utility function to check if password is needed to run sudo command.

We can add -n option to all sudo command that SSP used. However, once the
property drone.support_ssp is set to False, no SSP code will be executed.
Therefore, there is no need to add -n everywhere.

BUG=chromium:484396
TEST=local run
Start scheduler, confirm no password promt, and drone.support_ssp is False.
Run sudo true, enter password.
Run scheduler again, confirm no password promt, and drone.support_ssp is True.

Change-Id: Ifbd302973db5d443499311e435ec99e32d24cb5b
Reviewed-on: https://chromium-review.googlesource.com/269740
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
6 files changed