Turnbull resigns, triggering by-election