channel buffer: fix writerIndex increment bug

Ensure that writeByte(int) does not increment
writerIndex if the write was out of bounds.
channel buffer: bytesBefore bounds checking
empty channel buffer: fix tests

* Add @RunWith annotation to ensure that
  @Theory methods run.

* Assert critical invariants after every test and
  after every out of bounds exception.