A type of genetically engineered fly which eventually kills itself off can be an effective method of pest control, according to new research.