ctdb-tests: Add test for re-attaching detached database