Fix for issue 3190 (AI unable to interact with objects after using view-images verb)

Fixes deletion of src object rather than the intended p objected.
Also ensures ai/onclick doesn't depend on the photography module being present or bug free by gracefully handing the lack of a aicamera object.