Andy Murray was forced into a deciding set against Milos Raonic on his way to securing a spot in the final of the ATP World Tour Finals.