Add the rebuildSelectors capability to ebjs.c.

This function is currently in jsloc.cpp, but that file is going away.
Sure enough, this is another one of those functions that shouldn't be
entangled with the js engine at all. It is strictly DOM and html.
Without the js objects and compartments, it is easier to read and understand.
I had to add a few declarations at the top to let this file compile.
These declarations will not be needed when this is folded into edbrowse.
They will come in with the edbrowse header files.