Unit test and fix for SPARQL delete pattern bug

See https://brightstardb.codeplex.com/discussions/541011