Move some utility methods to nanopub-java