(500, 503) Improves formatting of array and hash.

There were several glitches in the formatting of array and hash
in certain corner cases:
* first element in manifest
* last element in manifest
* being empty, or having one element
* not breaking after end comma (only on separating commas)

This also fixes formatting of separator expression ';' which was handled
as a statement (triggering extra linebreak).
closes #500
closes #503