#1196: only set symbol visibility once

This is a better version of a previous fix which DOESNT break qpoases.
For casadi/CMakeLists.txt, set the symbol visibility only once and not in a loop.
For external_packages/CMakeLists.txt remove the add_compiler_export_flags() which
currently has no effect, as only C libraries use this macro.