refactor: make search path related functions more reusable

I'm planing introdoucing more paths like CTAGS_LIBEXEC_PATH.
For the purpose I make functions for manipulating search path and path
list more independent from variable and variable name.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>