terminfo: Support more terminfo directory structures

OS X's terminfo uses the hex representation of the first character of
the terminal name as the directory name.

Ubuntu seems to use /lib/terminfo instead of /usr/share/terminfo, at
least on the one machine I have access to.
auto merge of #7042 : kballard/rust/terminfo-searcher-paths, r=thestinger

r? @cmr