stub_manager and ifstub structs.
- Make stub_manager ref counted to ensure it doesn't get freed whilst
it is still being used.
- ifstubs are now freed only when the controlling stub_manager is freed.
- Rename stub_manager_ref/unref to stub_manager_ext_addref/release
respectively and make then take an unsigned long to prevent
malicious callers from passing in a negative value and corrupting
the ref count.