Leigh Halfpenny will leave Cardiff Blues at the end of the season after signing a two-year contract with Toulon.