Fix py26 issue when serializing empty lists

In python2.6 the json.load from the model does not give unicode,
and isnumeric is not defined on string types.

This causes an AttributeError to propogate on python2.6 if you hit
this condition.

On further review, this code can be simplified. If we're serializing
an empty list in the query protocol, we either strip off the '.member'
at the end of it's a non flattened list, otherwise we do nothing.