Use TaskInternal instead of casting BasicTask
Merge pull request #905 from aledsage/fix/use-TaskInternal-instead-of-casting-BasicTask

Use TaskInternal instead of casting to BasicTask
port SoftwareProcess so it supports hierarchical tasks, and inspection of individual ssh commands
fix a cross-execution-context bug, and make logging/warnings much less verbose and more informative
attach "stream" tags to tasks (in BrooklynTasks), and update ScriptHelper and SshTask to use this
adds task streams to the REST API and to the GUI; also tidies up misc elements of GUI (including clicking on a task takes you directly to drill-down (no inline summary), and blocking details for tasks in details top section)
some cleanups, mainly for the GUI (compress tasks by default, and ensure DST blocks on tasks sequentially so blocking link in GUI is more useful)
extend common commands so it can download to stdout; also update some of the Location usages to use specs, simplify that with LocalhostMachineProvisioningLocation.spec(), and create new test for new way of provisioning locations; and finally, restructure SshTasks to be a bit more intuitive
fix use of alternatives command, and various other tidies to CommonCommands;
start to migrate some to SshTasks, and convert postgresql and nginx to use them a bit better;
now better logging if sudo fails, and postgresql does a better job of installing and linking himself
(and starts to use quite a bit of guava / functional style)
conveniences and tweaks for software process tasks such as ssh, including isPidRunning etc; also CommonCommands.fail(...) which generates good error messages
introduce TaskAdapter and rename HasTask to TaskWrapper, to simplify API; and introduce TaskFactory,
so that SSH tasks can be easily reused
restructuring of SshTasks, to be in own directory, mostly independent of Brooklyn things
(still leans on SshMachineLocation; that could be easily generalised however); also rename CommonCommands to BashCommands

lots of changes e.g. moving to BashCommands, but nothing very interesting!
restructuring of how tasks in drivers are loaded, for use as tasks outside drivers (e.g. for chef)
more restructuring of how tasks in drivers are loaded, for use as tasks outside drivers (e.g. for chef),
with a MachineLifecycleEffectorTasks which can be easily overridden to get provisioning logic without drivers,
and now including *DynamicMySqlEntity* which constructs a (poor man's) mysql using dynamic effectors.
code review tidy and fix errors
reenable failing test
remove the AutoQueue class, replace with straightforward queue(name, callable)
add ssh put and fetch tasks, and restructure slightly (new separate SshTasksTest)
support non-legacy location construction via builder
comments and feed, and attempt to automatically detect the machine for SshFeed