Trump will almost certainly challenge the results if he loses — here's how that could play out