lib: Remove ab indicator view when detached from window

This prevents leaking the view on orientation changes.
Also prevent hide() from doing anything if mHeaderView is null.