Add extension traitlet to force dotted names

This addresses the problem from #7179 more generally. Tests will fail for this until that is merged.

I wasn't sure if this was really the best place for the custom trait, or if I should put it in `IPython.nbconvert.utils` or something instead.
An empty string allows no extension, which is probably valid, so maybe this should be `if value and not value.startswith...`. I'm not sure we care about that case, though.