Donald Trump's pathway to deporting millions of undocumented migrants may hinge on a 226-year old-law last used to target and detain non-citizens of Japanese, German and Italian descent during the Second World War.