Britain plans to leave the "direct jurisdiction" of the European Court of Justice and make its own laws when it exits the EU in March 2019, Prime Minister Theresa May says.