Codegen: clean-up imports
Codegen: do input checking in the Routine class
Codegen: Use the first function name as a default for prefix

Allow an abbreviated call to codegen:
codegen(("foo", 2*x*y), "F95")
rather than specifying "foo" twice:
codegen(("foo", 2*x*y), "F95", "foo")

This is particularly nice for languages such as Octave where the
filename (prefix) should match the function name.