More work towards being able to convert Level 1 structures to Level 2 structures.
More work towards processing imports from other files for the Level 1 -> Level 2 transformation.
More work on the Level 1 -> Level 2 translation
Merge branch 'master' of github.com:A1kmm/declarative-fieldml-prototype
More work on the L2 -> L1 transformation
More work towards the Level 1 <-> Level 2 translation
Implement more of the L1 -> L2 translation
Implement the remaining recursivelyImportExternal* functions.
More work towards translating L2 -> L1, with some minor changes to L1 to ensure we capture the right information to translate into L2.
Fix wrong method used in the parser; rewrite some of the import handler so caching works properly
Make the library typecheck.

Note: It still fails to build as a dynamic library even with -dynamic and -fPIC.
Change class lookup to use the common code. Implement domain function evaluate and domain variable ref.
Tidy up the code, and implement translations for domain definitions and types.
Implement more of the Level 1 -> Level 2 translation code - ensureNoLocalImports
Commit work so far on dependency ordering based Level 1 -> Level 2 processor.

This code has the difficulty that it won't handle mutually referencing namespaces correctly, e.g.:
  namespace a where
    domain D1 = clone b.D2
    val v1 :: (Real -> Boolean)
    ...
  namespace b where
    domain D2 = subset Real using v1
Here, the program will see a depends on b, and b depends on a, and fail, which we don't want.
I plan to change the code after this to do two passes over the entire model, creating
identifiers for everything in the first pass, and setting up the contents in the second
pass.
Document and reorder the code we already have, in preparation for a refactor. Also rename a few functions; no substantive changes.
Implement more of the L1 to L2 translation. The only thing missing is now the final alias symbol fixup and a utility function to make a user friendly name for an L2 identifier.
Implement fixAliasReferences.
Implement nsidToFriendlyName.
Re-arrange source tree so RunFieldML can link against the library not have a local dependency on the sources.