Fixes to make CasADi importable from external SWIG modules again

It seems that the step from CasADi 1.8 to 2.0 has introduced a few problems for using CasADi's SWIG files from external SWIG modules, which this PR attempts to fix:

* 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.

With these changes, I'm once again able to use CasADi's SWIG files (`%import casadi_core.i`) in our own SWIG module.