Added basic metadata addition and query

Added test suite

Added JSON output from queries
Added installation notes
Added missing definition
Corrected instructions
Enabled make check by default

I can't get this to work properly on OSX because aclocal is not
finding check.m4, even though I have added the aclocal path used by
Homebrew to aclocal's search path.