Paulihedral: a generalized block-wise compiler optimization framework for Quantum simulation kernels