TIMOB-13359: Added support for error objects of an event payload to be other than string.

https://jira.appcelerator.org/browse/TIMOB-13359

This fixes the bug in Lanica's "Gardens of Time" app when they migrated to 3.1.0. Test case in JIRA.