numCoresToUse (and rxOptions, in general) is related only to setting up distributed computing for RevoScaleR functions. foreach and doParallel do not use it. To run your script in parallel mode, you will need to first register a parallel backend for your foreach command. Instead of setting numCoresToUse, use
getDoParWorkers() should return 6 at this point. This sets up a "compute cluster" across each core, each of which can run an R process and communicate over sockets with the others.
Some additional resources on using foreach and doParallel that will explain more options on running in parallel: