Improve compatibility for :buffer command and add tests for existing behaviour

The `:buffer` command now

 1. Behaves correctly when a bang is provided or not.
 2. Accepts the buffer command as a count.

I've also added tests for the functionality that was already there but not tested.