Revert "Simplify MWTidy"

* Revert 122ababb: "Simplify MWTidy"
* Revert 98c2703f: "use stream_select() to get external tidy stdout/stderr"

Change-Id: I03cc1f46f8b69e1ff407526b74715beb2684bfb5