Add a fix and a test for issue #19.

Since event subject traversal didn't filter its nodes for valid
types, deletion of a subject would result in the last event link
node being put in the result set, which caused a crash when we tried
to serialize it.
Merge branch 'master' of github.com:mikesname/ehri-rest