Filter services.updateViewer() not to display undefined elements

Sometimes this call could get undefined elements (already deleted) in its annotations argument. This change filters these and only displays valid annotations.

One tricky source to create these undefined elements is: trying to create a new annotation when no user is logged in and also H is in dynamic bucket mode. Here when we realize that a login is needed, we already have an annotation stub, which we delete in the login process but the heatmap annotation items in the _fillDynamicBucket() before the login and an undefined empty stub survives. This will be an 'undefined' item in the updateViewer(annotations) call.

Fixes #897