Fix matching on hosts with custom ports or users set

This is an update of PR #1072 with passing tests
Thanks @cheald

Fixes #1071
Closes #1072
Merge pull request #1157 from shaneog/issue-1071

Fix matching on hosts with custom ports or users set
Disable loading stages configs on `cap -T`
Merge pull request #1078 from sponomarev/remove_stages_from_load_imports

Disable loading stages configs on `cap -T`
Do not raise exceptions when stdio is closed 

Question was calling methods on nil and `Errno::EIO` was raised.

This way you can properly handle `Interrupt` exception.
Merge pull request #1172 from mikz/patch-2

Do not raise exceptions when stdio is closed
made the deploy.rb template show better examples of how to set linked_dirs and linked_files.  refs #922
Merge pull request #1179 from betesh/master

made the deploy.rb template show better examples of how to set linked_dirs and linked_files.  refs #922