A quarter of Government databases should be scrapped or redesigned because they are probably illegal, a social justice think-tank said.