James Hook has signed for Gloucester after invoking a relegation release clause from French Top 14 club Perpignan.