Add ability to use bcat as a library for integration in other apps.

Also add font-family:mono; and white-space:pre-wrap; css styles for more console like output.
The changes to cat() are entirely splitting the body into a function and indenting (absolutely no functional change if running from the command line)