Cleaned up lots of warnings. cb now compiles and runs on MacOS X

* Now builds and runs successfully on MacOS X Yosemite
* This cleans up some of the hackiness from my earlier commit; put `/*static*/` back to `static` and instead declared matching function prototypes.
* Added a bunch of `#include`-s to get rid of warnings about implicit declarations for stdlib functions
* Cleaned up most warnings
* Jive wasn't working because Flex doesn't let you override the input character stream like Lex did: http://stackoverflow.com/questions/623503/what-is-the-difference-between-flex-lex-and-yacc-bison ... adjusted the code to use `yy_scan_string` and now Jive more or less working