Attribute invalidation recolors nodes

Color rules that color by continuous attribute are now reapplied when
the attribute they are coloring is invalidated.

Also started on preparing ForeignKey for serialization.