Add implementation of stack data structure.

See below comment - do we need a "new_head" identifier here?