Check for namedtuple_as_object support before using it

Commit ad248f6658d572f3f4721f804325db754e9c931d introduced the usage of
the namedtuple_as_object kwarg if using simplejson.

However, that kwarg isn't available until simplejson 2.2.0 which is a
problem for anyone running a RHEL/CentOS 6 distribution.

Normally this would not be a big deal since we can bump minimum required
versions but in this case simplejson is an optional runtime dependency
so most projects don't list it in their requirements.txt files.  So if
you are running with simplejson < 2.2.0 (you might not even know it) and
upgrade, things are going to get sad very quick.

Rather than assume people will be at the right level or figure it out,
let's be smarter and just check if the kwarg is available in the version
of simplejson we're using.  If we don't have a new enough version of
simplejson then fallback to using json despite the performance issues
on python 2.6.

This can be removed in Kilo when python 2.6 support is dropped so this
should be short-term workaround that saves some headaches once Juno is
released.

Closes-Bug: #1361230

Change-Id: Iadc2d28a1a0b125a34ed08344673c6b4a8a758e9
(cherry picked from commit 4d61c826eff57e112417e948f7166e8b29425f4a)
Merge "Check for namedtuple_as_object support before using it"