Added 'tty_mode' to 'container#attach' to notify RequestRawStream that tty is activated in container
Cleaning and refactoring RequestRawStream, to detect tty_mode and not hangs forever in this case'
Added timeout parameter to terminal, to allow set attach timeout