Israel's Supreme Court has struck down a controversial judicial reform that triggered nationwide protests last year against the Netanyahu government.