Make p4est_wrap work with user_data inside quads.

The biggest change is probably the addition of a p4est_replace_t inside
the p4est_wrap_t function. Other modifications:
- added a constructor that takes a user_pointer and a
  p4est_connect_type_t. the btype is used when constructing the ghost
  layer and the mesh everywhere
- added a p4est_wrap_adapt_ext function that takes a p4est_replace_t.
  this is used for replacing, coarsening and balancing. when refining,
  there is a check in replace_on_refine to see if the replace_fn isn't
  NULL in p4est_wrap_t and calls it after dealing with the flags.