[SPARK-4797] Replace breezeSquaredDistance

This PR replaces slow breezeSquaredDistance. A simple calculation involving 40000 squared distances between the vectors of 20000 dims shows:

* breezeSquaredDistance:  ~12 secs
* This PR: ~10.5 secs


Why have 2 separate loops?  It would be simpler and faster to remove the first loop in this method and to modify the second loop so it handles values in v1.