Remove unused variable causing warning

We don't need 'max' because 'idx' is monotonically increasing,
so when we exit the loop, 'idx' is 'max' by definition.

Removes compile-time warning of:
lua_cmsgpack.c: In function 'table_is_an_array':
lua_cmsgpack.c:370:21: warning: variable 'max' set but not used [-Wunused-but-set-variable]
     long count = 0, max = 0, idx = 0;
                          ^
Remove double free

(discovered by scan-build)
Refactor 5.2 version checking

Use a more forgiving version comparison for the future.

This change future-proofs compatability against any potential
upcoming versions 503, 504, 601, .... (assuming these API changes
remain stable).
Bump to version 0.3.1

It's been two years since 0.3.0 and there have been a few
small changes since then (including 5.2 compat).  Cutting
a new version allows other projects (and rocks) to pull
down additions easier.

Also adding a rockspec for 0.3.1 (tag 0.3.1 should be made
on the origin repo so rocks can pull properly).
Merge pull request #29 from mattsta/fix-things-and-bump-version

Remove warning, fix double free, bump version