UK government arms sales to Saudi Arabia are lawful, the High Court has ruled, after seeing secret evidence.