Basic support for link queries

This PR adds support for link queries - see issue #617. The core library does not support:

* queries on binary data (`NSData`)
* case insensitive queries on strings (`NSString`)
* predicates `BEGINSWITH`, `ENDSWITH`, and `CONTAINS` for strings

@alazier @jpsim @bmunkholm 
It took me a while looking at all the queries in this test to make sense of what we are actually querying. The reason I was so confused is because there is an implicit ```ANY``` in each of these queries. Without the ```ANY``` I'm not sure the queries really make sense.