Don't share periodic_task instance data in a class attr

The time of the last task run for a given periodic task was being
stored in a class attribute, which meant all instances of a class
shared the same last run time regardless of when they were
actually run.  This may not have been a problem in actual use of
the code because I believe in practice periodic task classes
are created only once, but it broke the unit tests because
subsequent runs of a task might behave differently depending on
whether a previous test had already run a task.

To me, this behavior is unintuitive and wrong so it should be
changed.

This commit also fixes the test cases to properly verify whether
the number of task runs expected actually happened.  The improper
call validation was the only reason these tests passed before.

Change-Id: I78fc249fd33bc41f3fa8f301414bc60463cadb07
Closes-Bug: #1275151
Merge "Don't share periodic_task instance data in a class attr"