Port merged mining support.
Merge pull request #4 from chizu/merged-mining

Port merged mining