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

https://jira.appcelerator.org/browse/TIMOB-13359

Backport of TIMOB-13359 to 3_1_X.