Port merged mining support.
Needed to remove this to build on Linux.
Restore Litecoin's implementation of default paths.

This lets the testnet functionality work again too.