Add a stack property to DeveloperError and RuntimeError.

This makes those errors display properly when thrown by specs.
Fix errors when cleaning up the imageryLayer_reproject context cache object.