$\texttt{FORM}$: Learning Expressive and Transferable First-Order Logic Reward Machines