Generalized Inverse Planning: Learning Lifted non-Markovian Utility for Generalizable Task Representation