Theresa May says legislation will ensure restaurants cannot legally retain part of service charges.