Reworked row/column label trimming in grid.js.

Regards https://github.com/aphyr/riemann-dash/issues/33.

How about this? Suppose 4 hosts: nil, host, host1, host2, host3.

After trimming, the labels should be: nil, host, 1, 2, 3.

Also, JSHint yelled at me so I put in some semicolons.