Nigel Farage has won back his seat in a UK by-election after previously resigning amid a probe into his finances.