switch models world from "2d array of objects" to "object of typed arrays

This is kind of a huge commit, and there's a lot more to be done.

I'm switching worlds from being a 2d array of objects to being objects of 1d typed arrays.

So before we had
```js
water.world[x][y] == {
  volume: 1,
  elevation: 2,
  siltFloating: 3
}
```
Now, for the same (x,y) we have:
```js
idx = water.width * y + x;
water.world.volume[idx] == 1
water.world.elevation[idx] == 2
water.world.siltFloating[idx] == 3
```
These arrays are typed contiguous arrays like `Uint32Array`, `Float32Array`, etc.

There's more to be done. Sampling is especially inefficient, as I kept the previous interface. So when you `water.sample(x,y)`, that samples *all* the arrays and builds an object to return. Sampling should probably then specify a field to sample.
Yeah I'd stick with underscore for now, for uniformity. It has _.keys, _.values, _.pairs. I think ES6 is supposed to provide something like _.pairs, (called Object.items I think) but it's not there yet. For example you can do
```
for ([key,value] of _.pairs(obj)) { … }
```


On Jun 24, 2014, at 1:38 PM, Benny Lichtner <notifications@github.com> wrote:
> In ModelingCore/BaseModel.js:
> 
> >          for (var i = x; i < x + width; ++i) {
> >              for (var j = y; j < y + height; ++j) {
> > -                for (var key in obj) {
> > -                    this.world[i][j][key] = obj[key];
> > -                }
> > +                var idx = this.toIndex(i,j);
> > +                _.each(_.keys(obj), (key) => {
> Ah, damn. Well it looks like Object.keys <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys> is built into modern browsers now, but since we're using underscore anyway, I guess we can stick with it?
> …
> —
> Reply to this email directly or view it on GitHub.
>