Refactor Y/N prompts

Refactor common functionality to make code more readable.

Note: this code should have same behaviour, but that behavior isn't
actually correct.  It doesn't properly handle the case where there are
multiple Y|N questions asked.

BUG=chromium-os:21568
TEST=builds clean; Y/N questions still asked and answered properly in Y
and N cases.

Change-Id: I1edc0e39dad70865015a442f9b655a1a4f1f5cca
1 file changed