Tweak terminfo::parm::expand function signature

Take a new struct Variables instead of two &mut [] vectors for static
and dynamic variables.
Don't require &mut [Param] with terminfo::parm::expand()
Fix a bunch of failure cases in terminfo

Replace all potentially-failing operations with Err returns and add
tests.

Remove the Char parameter type; characters are represented as Numbers.

Fix integer constants to work properly when there are multiple constants
in the same capability string.

Tweak loop to use iterators instead of indexing into cap.