Europe's top court is weighing a landmark case that could allow private equity investors and other nonlawyers to buy shares in German law firms, radically changing the legal market in Germany and beyond.