The Government went too far by forcing the public to remain inside during the pandemic, Professor Sir Chris Whitty has suggested.