Researchers have invented a device that can plug into a smartphone and test people's blood for HIV or syphilis.