Assert that the ringbuf has the right size / Add compile time assert

This PR has to patches. The fist supports compile time asserts. The error itself is not really helpful, but as one still gets file name and line number its better than nothing.
The second uses the new compile-time assert-feature to ensure the the puffer passed the the ringbuf function fulfills the requirements.