Add more concrete types.

Add concrete return type for getaddressesbyaccount and make some of
the other command type handeling more explicit in the code.