use py_object to create pointers to globals variables

* _history_length, startup_hook, pre_input_hook and completion_
display_matches_hook, completer, beginidx and endidx are all
pointers now. Changing their value changes what they point to,
although the pointer itself is unchanged
* don't make hook_var a pointer, since py_object _is_ a pointer!
add rlhandler and completed_input_string