fixed bad shared_ptr_from_this() calls

also edge_[*].type was not being set when tiles loaded from database.