toJSON and toPTree methods of Metadata (and others) should be in PDALUtils.hpp, not inside class implementations

This stuff should be in helper utilities, not inside the classes themselves. We'll add whatever public interface we need to support moving these things out.