rgw: change json formatting for swift list container

Fixes: #4048
There is some difference in the way swift formats the
xml output and the json output for list container. In
xml the entity is named 'name' and in json it is named
'subdir'.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: plain format always appends eol to data

Beforehand we just prepended the eol to the next line, so that
the last line also gets eol.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>