Add failing tests that demonstrate issue #81.
Clean up redundant ast-types requirement.
Refactor hasParens into hasOpeningParen and hasClosingParen.
Construct a partial NodePath for the original tree during reprinting.
Make hasParens and helper functions take a NodePath instead of a Node.
Fix parenthesization logic for function expressions and object literals.

The hasParens function was subtly broken before this series of commits,
because it was considering the entire original source code when scanning
for parentheses, instead of limiting the search to just the code
associated with the original subtree currently being reprinted. In other
words, if you copied a node from a location in the AST where it did not
need additional parentheses to a location where it needed parentheses,
hasParens would mistakenly return true for the new location.

The canBeFirstInStatement method was added in v0.3.28 of ast-types:
https://github.com/benjamn/ast-types/commit/be0ac5ee0d6c5cf1598bbcdac09acaaeafd5d99f

Fixes #81.