Revert "Revert "Merge pull request #281 from travis-ci/repository-settings""

This reverts commit 714ad0945756006f6f8c1bd46b9031f90e25ed6e.
Change settings column type to JSON

I also needed to change schema format to sql, because AR 3.2 does not
support JSON type natively