Split up a string with an eventually qualified declaration name into 3 components
module name
top-level decl
full-name of the eventually nested decl, but without module qualification
Example
"foo" = ("", "foo", "foo")
"A.B.C.foo" = (A.B.C, "foo", "foo")
"M.N.foo.bar" = (M.N, "foo", "foo.bar")