Fixed referenced flag writing timing on next(). It should place before flush. Added msgpack_tuple test for CMakeLists.txt Untabified CMakeLists.txt Added reference function test.