Implement `map_mut` on the Option type

Closes #7394