Gerry Adams was interned illegally during Troubles, supreme court told