CC-5788 : Library Cleanup

adding clear/search buttons for advanced search.
only saving library state when needed.