Add toJSON and fromJSON mechanisms for in-n-out to bypass tile construction

cc @Raynos @countrodrigo 

It's very strict about rebuilding from versions and I haven't tested that, yet, but will update this PR with more tests while you review the core code changes. :)