Fix handleGetBlock/handleGetRawTransaction to return btcjson.Error

Wrap *.BtcEncode errors into btcjson.Error when failing to encode wire
bytes to buffer