PROTON-436: fixed pn_data_dump for complex types
initial encoder implementation