Replace options/callback handling in domid/domname

The previous options/callback handling was not really good, because it's
impossible to omit the options parameter, so why check for it?
Fix test directory structure and add a few more tests