[LIVEOAK-38] Suppport Map-like values when encoding.
Also, add a more specific exception type for non-encodable values.