SERVER-9515 Provide function for generating BSON representation of a role