[RDY] garray: add unit tests and refactor

The unit tests won't run when they're all together, because of #363, but you can test them separately like this:

```bash
busted --pattern=garray.moon ./test
```

I made these tests so that we could change garray with less fear of breaking something. The refactoring commits will come soon but are blocked on #616.