Fix #186 - Enforce only calling finalize once in Socket and Context