Google's DeepMind AI wing was given access to the personal medical records of 1.6 million NHS patients on an "inappropriate legal basis," the UK's top data protection adviser to the health service has said.