The idea that we might be living in a simulated reality has worried us for centuries. Now physicists have found some tantalising clues – and devised an experiment that might reveal the truth