Edit JSONPlugin class so that list objects are automatically encoded as JSON.

Having a list as the root element of a JSON document is perfectly valid. The auto-decoding of JSON documents with lists at the root works just fine; this fix allows bottle to also automatically encode list objects to JSON.