Ensure result of indexOf >= 0 before using

Calling view.unbind() more that once will result in the callback not
being found (indexOf returns -1).

Calling splice with an index of -1 will remove the last item in the
list.

Instead, check the result if indexOf before using it and skip the
splice when the callback was not found.
Merge pull request #307 from davidcl64/unsubscribe-when-not-found

Fix: Ensure result of indexOf >= 0 before using when unsubscribing