Convert FORTRAN modules to namespaces

This helps fix linking issues and ambiguity related to the difference between classes and modules in FORTRAN 2003+. @albert-github can you take a look at this?