Feature/fix perf

/to @ritch 
/to @bajtos 

Here are a few patterns I use:

1. Convert array.forEach(fn) to for(var k = 0; k < keys.length; k++) {...};
See: http://jsperf.com/fast-array-foreach

2. Avoid Object.defineProperty()
See: http://jsperf.com/object-defineproperty-vs-definegetter-vs-normal/21

3. Avoid array.indexOf() 
We can optimize beyond v8 since we have concrete type definitions in loopback. Below is a basic example of this.

```js
ModelClass.forEachProperty = function (cb) {
  var ModelClass = this; // remove the heap closure lookup
  var def = ModelClass.definition;
  var props = def.properties;
  var keys = def.propertyNames; // static array determined during definition
  var len = def.numProperties; // determined during definition
  var i = 0;
  for (; i < len; i++) {
    cb(keys[i], props[keys[i]]);
  }
};
```