Removed unneccessary variable and is_valid test from p4est_connectivity_reduce
Added type casts to p4est_ghost_is_valid