lua cache bindings: error out if cache isn't open yet

The catch is that during configuration file processing,
no cache is open (yet), as kresd can't know if the config
does open it in some later part (with non-default path or size).
Now we just throw an error.  Exceptions:
 - cache.open() and cache.backends(), of course :-)
 - cache.ns_tout() - not required, it's not really inside cache
 - cache.close() - it sounds reasonable to allow "closing a closed cache"

This immediately caught a typo in cache metatable.
18 jobs for lua-cache.clear in 8 minutes and 8 seconds (queued for 10 seconds)
Status Job ID Name Coverage
  Build
passed #157598
amd64 linux docker
build:clang:linux:amd64

00:00:48

passed #157597
amd64 linux docker
build:linux:amd64

00:00:48

passed #157599
amd64 linux docker allowed to fail
srpm

00:00:23

 
  Test
passed #157606
amd64 linux docker
deckard:linux:amd64

00:06:57

passed #157613
privileged
distro:epel-7

00:02:32

passed #157612
privileged
distro:fedora-27

00:03:17

passed #157605
docker
doc

00:00:48

passed #157604
amd64 linux docker
installcheck:linux:amd64

00:01:39

passed #157607
amd64 linux docker
installcheck:valgrind:linux:amd64

00:02:19

passed #157601
docker
lint:c

00:03:00

failed #157602
docker allowed to fail
lint:clang-scan-build

00:01:26

passed #157600
docker
lint:lua

00:00:34

passed #157610
amd64 linux docker
respdiff:iter:tcp:linux:amd64

00:03:38

passed #157611
amd64 linux docker
respdiff:iter:tls:linux:amd64

00:03:57

passed #157609
amd64 linux docker
respdiff:iter:udp:linux:amd64

00:03:52

passed #157603
amd64 linux docker
test:linux:amd64

00:01:21

passed #157608
amd64 linux docker
test:linux:amd64:valgrind

00:01:24

 
  Coverage
passed #157614
amd64 linux docker
coverage

00:00:21

70.8%
 
Name Stage Failure
failed
lint:clang-scan-build Test
  CCLD	modules/stats/stats.so
CCLD modules/cookies/cookies.so
CCLD modules/bogus_log/bogus_log.so
scan-build: 29 bugs found.
scan-build: Run 'scan-view /builds/knot/knot-resolver/scan-results/2018-08-03-152335-14-1' to examine bug reports.
Uploading artifacts...
scan-results: found 34 matching files
Uploading artifacts to coordinator... ok
id=157602 responseStatus=201 Created token=PZyMZfJp
ERROR: Job failed: exit code 1