A new treaty to govern international waters is "tantalisingly close" after countries - including Britain - promised to sign it into law.