FORGE-593 Added state verification to prevent monitor locking on multiple readers.

The available() method is used to detect if a blocking read() should be performed on the console inputstream. This prevents/reduces the possibility of the reader thread from blocking on the console during a Forge restart triggered by a plugin installation. Additionally, during shutdown of the console, the reader thread is interrupted should it have acquired a monitor on the console inputstream, thus allowing for a clean shutdown.