RPC: Add mergecoins function

This method allows you to merge inputs according to specified criteria