fix work packages still displayed after deletion

[``* `#16147` work packages still displayed after deletion``](http://www.openproject.org/work_packages/16147)
@0xF013 I think it'd be clearer to use `Array.filter()` here. I believe it's supported by all the browsers we target.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
http://msdn.microsoft.com/en-us/library/ie/ff679973(v=vs.94).aspx