Revert "fixed bug #3319"

See 092f916 for explanation.

This reverts commit 4f9c081dc313f8fdfee3f0a4572779ae13e27e40.
Re-fix bug #3319 with less side effects.
Removed an unnecessary workaround for matrix-to-vector copyTo.
Added a test for matrix-to-vector copy and convert.
Merge pull request #2159 from SpecLad:1xN
Fixed bug #3489: The code assumed that two global variables would be constructed in a particular order, but global variable initialization order is compiler-dependent.
Merge pull request #2171 from djetter99:fix_static_init_order
fix cross-compilation issue with Numpy
reorder the if's for clarity