Allow Entity objects to be copied around.

Note that this doesn't use shared_ptr, but this is little different
from the previous implementation using a reference.