Added wait_flushing/1 and archive_message/6 for every backend.
Added mod_mam:debug_info/1.
Fixed a call from gen_mod:get_module_opt/3 to gen_mod:get_module_opt/4.
Use apostrophe to escape SQL.
Added mod_mam_riak_arch:is_riak_available/1.