Add misc/ternary_search.h