Anonymise template molecules and queries when searching for templates to use for layout.

Change-Id: Icf3ad2d0f36c4ea66e213b1cb3c5cb6b99806003
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Ensure adding and removing templates still works correctly.

Change-Id: I229c437a079c4e14e286c30a5cdc59200546232b
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>