SERVER-7588 Improve logic for seconds and milliseconds in ISODate constructor

Do not use floating point for seconds, only for milliseconds. Adjust other
date components when milliseconds round up to 1000.

Code backported from Tad Marshall's master branch commit:
https://github.com/mongodb/mongo/commit/7cf042ff3e0c97a7fe701cd85f5cdd4c1519179b