Fixes to make CasADi importable from external SWIG modules again

* Wrap some traits/fragments with `#idef CASADI_MODULE` to avoid leakage into
  code that SWIG generates for other modules.
* Specify the package of all CasADi modules since they now reside in the
  `casadi` package in Python. Otherwise, e.g. `%import "casadi_core.i"` will
  always emit an unqualified `import casadi_core` line into the generated
  Python wrappers. Now it becomes `import casadi.casadi_core` instead.
Merge pull request #1223 from toivoh/module_compatible4

Fixes to make CasADi importable from external SWIG modules again