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.