In a 5-4 ruling, justices argue that rarely used legislation infringes on principle of equal rights; Knesset given one year to fix legislation