common: cope with latest json-c include path changes.
build-sys: fix a couple of linking mistakes and omissions.

There is one more subtle issue remaining, namely we currently have
an ugly circular/cross-dependency between lua-decision, core and
resolver. For the time being it won't be addressed as we can work
er... link around it anyway.