Second fix for erogenousbeef/BigReactors#95

Two different fixes here.
One, we weren't checking for invalidated tile entities when adding parts
to machines. Obviously, if a TE isn't valid any longer, we shouldn't add
it to machines.

Two, we weren't unregistering TEs from the registry's lists when they
got invalidated without an attached controller. This could happen on
chunk unload or on very slow chunk loads on the client.