[donc] Fix building the cubicweb js documentation
Avoids errors such as:
Exception: Bad file id cubicweb.lazy referenced in INDEX_IN_ORDER in ../../../doc/tools/pyjsrest.py, fix this please
fix failures introduced by recent refactoring
* * *
[testlib, realdb] we should close connections prior to create a new db using current db as template