Clean up of refinement (fix memory leak).

Fix several bugs related with uniform refinement. Fix memory leak (don't
create PetscDM) and recursive refinement.