Deduplicate features in the Pickler

* Move PickleNode to the header since we need it as an argument type.
Move the Pickler topLevelValue to an argument of pickle()