Add RPC call to generate and verify merkle blocks

(based on #5181 as it would otherwise conflict and I'm lazy.)

Adds RPC calls to generate (and verify) merkle blocks which, though verify is less useful for Bitcoin Core, just making them more accessible so that (hopefully) they become useful for people to exchange around would be very nice.

Full Disclosure: This is required to sidechain-related work.
That is #5181 and is code-move-only, so I dont want to change it.