Some fixes from my fork

My English skills is pretty bad, but I'll try to express myself.

Fixed several buffer underflow (memcpy and others);
Added new(std::nothrow) where code checked result for NULL value;
Removed "if statement" from SAFE_DELETE and others, because delete 0; and free(0) is a valid construction;
Printf arguments changed to %f, because %d is a decimal, not double.
Some typos;