Small changes and extra CRC code

Small bug in read_next_header when skipping bytes. Small bug in getbits
(though this would be very rarely encountered). Modified one more
section of CRC checking code. Tidied up some formatting of code.