Add helper for testing signals and slots.

Added new helpers.py file for small unit test helper
classes and functions.

Added CallTrack class which can record calls to its
slot function. Useful for testing signal and slots.
Add a minimal QModelIndex mock for testing.

To reach some error conditions we need to provide
specific model indexes we would be hard to create
from the real model. In classes that only use a
small subset of model index functionality this mock
can be used to create such indexes.
Add unit tests for action_stack_model .

Added unit tests for functionality of ActionStackModel
class which also tests its dependencies namely the
Action and ActionStack class.

Added some comments and did some other minor modifications
to ActionStackModel in reaction to things that came up
when writing the unit tests.