Finalize support for gettxout. 

This pull request finalizes support for the gettxout rpc. A new error type has been added for invalid transaction output numbers.