Added a consistency checking function to cba.c
Added a consistency checking function to cba.c

check() takes a bitarray struct and tests it against a series of
assertions in order to detect programming errors. It is static to
cba.c, and is used to check bitarrays that are passed as arguments or
returned to callers.

ingramj/cba