Use std shared_ptr in mapgenformat

Made internal::format_data use a shared_ptr.

Fixes some memory leak: the result of mapf::basic_bind was given directly to mapf::formatted_set_simple, which did *not* delete it.

Also made the global function fix_bindings into a member function.
Also no need for manual cleanup.
Remove formatted_set_terrain,

two place where it was used now use formatted_set_simple