Added a clear() method to class Stack

Signed-off-by: Ashish Madeti <ashishmadeti@gmail.com>