Home Office launched a system for checking passport photos despite knowing it would struggle with dark skin, department admits