consensus lib work: Reduce boost dependencies

These are the functional changes needed to remove boost as a dependency from the upcoming consensus lib.

After these changes, a good bit of code movement is still needed to actually remove the dependencies, but it's little more than copy/paste. Those will come as a 2nd PR after this one to ease review.

Please pay special attention to the new serializers in walletdb.cpp. I believe I've ported that correctly, but I'd like to have lots of eyes on it.
A long, long time ago
In a galaxy far, far away...
^H^H^H^H^H^H^Hit was always typeVarName, but anything that isnt introducing another conflicting style is good with me (generally matching what is in surrounding code is best).