refactor brace-matching example:  use a Stack ADT; add some helpful comments