Refactor, extract phlsys_timer from arcydreporter

Extract "Timer" and "timer_context" from abdt_arcydreporter.py so that
we may re-use them. Use 'rope' to do the extraction safely.

Test Plan:

make sure refs to 'Timer' are correct
$ git grep Timer

make sure refs to 'timer_context' are correct
$ git grep timer_context

Just in case
$ ./precommit.sh
Add phlsys_timer.Timer.restart(), for convenience

When you're timing something in a loop, it's pretty common to want to
get the duration and re-start the timer. Combine these into a single
method for convenience.

This is used in subsequent commits.

Test Plan:
Added doctest
$ ./precommit.sh
Add '--external-report-command' to arcyd

Make it easier to hook up arcyd to external monitoring by providing an
optional callback to an external command, which will be provided with a
report in json.

Set this up in the test shell for easy exercising.

Test Plan:

Check that happy path logs json reports to file
$ ./testbed/arcyd/test_shell.sh
    $ tail -f ../arcyd/savereport.txt
    .. logs json reports as expected ..
    $ exit

Add 'false' line into 'savereport', to exercise unhappy case
$ ./testbed/arcyd/test_shell.sh
    .. wait ..
    $ exit
    .. error appears in logs as expected ..

Make 'savereport' non-executable, to check that we fail fast
$ chmod -x testbed/arcyd/savereport
$ ./testbed/arcyd/test_shell.sh
    .. wait ..
    $ exit
    .. fatal error appears in logs as expected ..

Check that other code paths are unaffected
$ ./precommit.sh