Unfolded band structures of photonic quasicrystals and moiré superlattices