Saudi frees thousands of ex-terror suspects: minister