Avoid mutating adjacency lists from training reaction sets.

This fixes the issue of starred atoms getting erased in the
website for training reactions, and therefore database
edits through the website leading to errors.  This is because we try to
match reaction templates to the training reactions, mutating
the adjacency lists while doing so.  Therefore, deepcopy
all the reaction information before proceeding.  Though
this increases the time spent, it will only be necessary
at the start of a job or website load.