[SPARK-4611][MLlib] Implement the efficient vector norm

The vector norm in breeze is implemented by `activeIterator` which is known to be very slow. 
In this PR, an efficient vector norm is implemented, and with this API, `Normalizer` and 
`k-means` have big performance improvement.

Here is the benchmark against mnist8m dataset.

a) `Normalizer`
Before
DenseVector: 68.25secs
SparseVector: 17.01secs

With this PR
DenseVector: 12.71secs
SparseVector: 2.73secs

b) `k-means`
Before
DenseVector: 83.46secs
SparseVector: 61.60secs

With this PR
DenseVector: 70.04secs
SparseVector: 59.05secs

In bytecode, there is no direct `switch` operation. As a result, the `swtich` or pattern matching will be compiled into `if` statement in the bytecode. See the following example
```scala
  def fun1(p: Double) = {
    p match {
      case 1.0 => 1.0
      case 2.0 => 2.0
      case _ => p
    }
  }

  def fun2(p: Double) = {
    if (p == 1.0) 1.0
    else if (p == 2.0) 2.0
    else p
  }
```
will be compiled to
```
  // access flags 0x1
  public fun1(D)D
   L0
    LINENUMBER 145 L0
    DLOAD 1
    DSTORE 3
   L1
    LINENUMBER 146 L1
    DCONST_1
    DLOAD 3
    DCMPL
    IFNE L2
    DCONST_1
    DSTORE 5
    GOTO L3
   L2
    LINENUMBER 147 L2
   FRAME APPEND [D]
    LDC 2.0
    DLOAD 3
    DCMPL
    IFNE L4
    LDC 2.0
    DSTORE 5
    GOTO L3
   L4
    LINENUMBER 148 L4
   FRAME SAME
    DLOAD 1
    DSTORE 5
   L3
    LINENUMBER 145 L3
   FRAME APPEND [D]
    DLOAD 5
    DRETURN
   L5
    LOCALVARIABLE this Lorg/apache/spark/mllib/stat/Test$; L0 L5 0
    LOCALVARIABLE p D L0 L5 1
    MAXSTACK = 4
    MAXLOCALS = 7

  // access flags 0x1
  public fun2(D)D
   L0
    LINENUMBER 153 L0
    DLOAD 1
    DCONST_1
    DCMPL
    IFNE L1
    DCONST_1
    GOTO L2
   L1
    LINENUMBER 154 L1
   FRAME SAME
    DLOAD 1
    LDC 2.0
    DCMPL
    IFNE L3
    LDC 2.0
    GOTO L2
   L3
    LINENUMBER 155 L3
   FRAME SAME
    DLOAD 1
   L2
    LINENUMBER 153 L2
   FRAME SAME1 D
    DRETURN
   L4
    LOCALVARIABLE this Lorg/apache/spark/mllib/stat/Test$; L0 L4 0
    LOCALVARIABLE p D L0 L4 1
    MAXSTACK = 4
    MAXLOCALS = 3
```