various fixes and refactors
- replace two 'case's with one
- the opposite of 'lower' is not 'greater' but 'higher'
- eliminate unnecessary intermediate var
- use rabbit_misc:protocol_error/4 instead of
  rabbit_misc:protocol_error/1 + rabbit_misc:amqp_error/4
- don't use ~p unnecessarily