Mostly motivated by the need of async/await.
As part of preparing to expose some of its methods as pub for ChannelManager-less phantom invoice generation. Pure code move of the module + the addition of module-level documentation