A Virgin Australia plane bound for Melbourne from New Zealand had to make an emergency landing after one of the jet engines caught on fire.