Add type mapping capability

two global variables:
- g_tw_lp_types: array of tw_lptypes
- g_tw_lp_typemap: function to convert gid to type index

one function:
- tw_lp_setup_types: makes sure the globals are set, then maps each lp
to its type
Default type mapping function for one type

always returns (index) 0