Getline Integration - Take 2

Another approach of implementing getline.cs

I discovered the PSHostUserInterface class which seems to be the user interface class of powershell. That's why I implemented getline in the LocalHostUserInterface, to have a single class for the user interface and no separate console interaction.
Because the specification of this class doesn't allow to pass the return value of the "prompt" function, I modified getline.cs, s.t. it is possible to print the prompt in advance. This made some changes of the last approach unnecessary, so I just opened a new branch with only the needed changes.

I changed the UI property of LocalHost to return always the same instance of the UI instead of new instances on each call. Also, I added unit tests to test the LocalHostUserInterface, and they work from inside MonoDevelop and VisualStudio. However, there are still two issues I wasn't able to solve:

With nunit-console and nunit-gui, TestReadLine doesn't work, as Console.SetIn() doesn't work as intended. Instead of using the defined StringReader, it still waits for user input.
The second limitation is that running these tests with nunit will never test the getline-based ui. This is because nunit doesn't run in a terminal emulator and thus properties like Console.WindowWidth are 0, so getline.cs isn't usable.

Fell free to close the other pull request (I didn't find a way to do so) and please provide comments, especially about the testing issue.

Regards,
Stefan

------------------
Original idea:
Only the windows console offers convenient functions to use Pash (edit command in line, use history, abort, etc). On other systems, all of these actions, for example the arrows keys, caused invisible characters to appear an cause parsing errors.

To get a more usable user experience, I integrated getline.cs (https://github.com/mono/mono/blob/master/mcs/tools/csharp/getline.cs) for non-Windows systems.

It can be controlled with the newly introduced PASHUseUnixLikeConsole variable. Not setting it (default) will lead to getline.cs on all non-Windows systems. Setting it, e.g. in config.ps1, it will control whether getline.cs will be used or not.