extend Solaris ps output to include unrestricted command length and append zone info 

Commit contains these squashed commits:

commit 81f19834f5a8c889a3ca00e8054188253bc73c10
Author: Matthew Cattell <matthew.cattell@cfengine.com>
Date:   Fri Jun 20 00:43:27 2014 +0200

    make sure zone header shows and ensure zone name appended to end of line

commit de8518c7fb75582063a26bcc4d6c5160d6ede1ac
Author: Matthew Cattell <matthew.cattell@cfengine.com>
Date:   Fri Jun 20 00:31:26 2014 +0200

    add zones wrapper to get zone name

commit 8687a20ebd3750fff66c77e683b29138e1e60d10
Author: Matthew Cattell <matthew.cattell@cfengine.com>
Date:   Fri Jun 20 00:27:41 2014 +0200

    add zone column to end of ps output
Do you really need to '\0' out the spaces in the buffer ?
How about:
```
size_t len = strlen(buf);
while (len > 0 && isspace(buf[len - 1])) { len--; }
buf[len] = '\0'; /* no-op if we saw no spaces */
```
which leaves you with the truncated string in buf and suitably decreases len, which is what you actually need here.
I think you could even skip the final `buf[len] = '\0';` unless ForeignZone() cares about there being no dangling space.