Create mw.dumpObject split from mw.logObject

Add an mw.dumpObject() method, which converts an object in the same manner
as mw.logObject(), but returns it instead of adding it to the log buffer.

Change-Id: Ie9fbd24d9d8d13ee2ddf8052679010892f61e1e0
Merge "Create mw.dumpObject split from mw.logObject"