Double Olympic gold medallist Mo Farah has pulled out of the Commonwealth Games because he has not recovered fully from a recent stomach ailment.