Mongoose slug generation middleware