Remove functional dependencies from Modifier

Remove the functional dependencies from the Modifier class at the
expense of requiring a little more type annotations. But this is
unlikely to happen in real applications, as the types are fixed in the
signature. The good thing about this is that it allows us to reduce the
usage of UndecidableInstances extension, which is a good thing.