Listening to music before, during and after an operation can help reduce pain, according to a review.