Added place for extensions to register state-reset-functions; closes #370.