a bunch of equals fixes

-fixed floatmax_t issues from Sören's commit
-moved num_lements check of DynamicObjectArray to CSGObject (cleaner)
-added some new unit tests for num_elements and some NULL cases