Update `mongoose` to v9.1.5 and convert middleware hooks. Co-authored-by: Thomas Ruoff <111471+tomru@users.noreply.github.com>