Two-dimensional metal halide perovskites and their heterostructures: from synthesis to applications