Add a log_level filter for getLogEntries()
Add prepare_output() method to ajax handler

This puts the onus of preparing the data format on the ajax
handler as opposed to the methods that it ends up calling. This
will also attempt to pull errors out of the logging system.
Update character ajax functions to work with prepare_output()
Update getLogFile() with some error handling for missing files
Break apart some nested code

Because PHP is an inherently shitty language, it posts notices/warnings
when you nest certain array functions like this. Additionally, since the
ajax parser is converting all warnings/notices into errors and then
catching them, we need to take them out of the system.