power_LoadTest: Add parameter for custom tasks

Added a parameter, 'tasks', to power_LoadTest's control file that can
override the default tasks in extension/urls.js with a custom set of
tasks.

Also fixed the way URL cycling delays are scaled in background.html.
Previously, they were not scaled along with start and duration, based on
time_ratio.

Also created functions to convert time into milliseconds, to clean
up code.

BUG=chromium-os:13437
TEST=Run the example in the control file.  Set loop_time to something
low, like 120 seconds, and loop_count to 1, so the test doesn't run for
an hour.

Change-Id: I8187341934ceb1944f5c5cdb2ad9ddc64b9169fc
Signed-off-by: Simon Que <sque@chromium.org>

Review URL: http://codereview.chromium.org/6675052
9 files changed