Fix test compilation with nmake: add the gdi.lib dependency

ACK: efekty
Missed lock acquire/release in event_base_cancel_single_callback_()

Call backtrace:
...
event_queue_remove_active()
event_callback_cancel_nolock_()
event_base_cancel_single_callback_()
event_base_free_()
event_base_free()
...

Fix for e9ebef83