Move the Stack class into stack.py

Stack is one of the most important classes in our project
and it is in a module with seemingly an unrelated name.
The name is historical, it started off been an assortment of functions
that parsed the template and much of the original content has
been moved out bit by bit into specialized modules leaving the Stack
class behind. This patch will hopefully complete the job by putting
the Stack class into the stack module.

More changes are to come to make sure that the users of the parser module
migrate to using the template and stack modules directly.

Change-Id: I81f8ed05e6dc7f14ec093cf2178f3ab5e3e4dda0
Merge "Move the Stack class into stack.py"