Moving readpos to same structure as writepos.
Rename whead->free to whead->used to better reflect usage.
Drop buffer_usage variable.

Calculate directly from pointers. This has a nice effect of reducing the number of atomic operations required to keep track of buffer usage. It was essentially a duplicated state as well which is bad at it might go out of sync.

Another nice side-effect is that is makes it more feasable to port to older platforms where __sync_xx operations isn't available.

Fixes #3.
Merge branch 'calc_bu'