Introduce bk_err and bk_bool rather than using int for both of these.
This means that the function definition now specifies whether 0 means
no error, or whether it means false.
Improve the header script by rewriting it so that it is fully
automated with a single command. It now updates the
included version file as well as the header.