Maintain order of callback array elements
Fix array_insert()
Rename some functions

callback_set_handler -> callback_register
callback_find -> callback_lookup

^ for consistency with the native API
Use bsearch() for native lookup