Various fixes including refactoring CF console to define console stream
content in a new abstraction, handling errors for each to prevent
failures in any one streaming operation to affect other log streaming.
This refactoring will also be used to stream staging logs to the console
on application start up. Fixed various timing issues, cleaned up code
with unnecessary operations, fixed 400 Bad Request error when checking
for app instance stats. Fixed issue where login failure was not
correctly being detected as the exceptions were wrapped in a
CoreException. Also fixed error where console output stream were not
being closed when an application was stopped.