added proper destroy function to all basic nodes

so that it will remove the parent pointer from the entities before
losing their pointer. also made the lights and shadows auto-remove when
target is lost functionality.