Moves colorspace.js and function.js into core/

Fixes #4802