NO-JIRA: Fix core dumps and memory management errors in  python binding, engine.py.

Tests were dumping core, valgrind showed pointers being used after deleted.

Fix strategy in engine.py:

Always delete a pointer attribute after freeing it. Any attempt to use a freed
pointer is an error, by deleting the attribute we detect the error faster and
with a python trace rather than later on as a core dump in C code.

Found and fixed bug in Endpoint.release, was using deleted pointer.