Minor optimizations and API cleanup for binheap.

This patch makes minor optimizations to binheap:
* Reorganize 'struct binheap_node' layout.
* Add 'restrict' keyword in a few places.
* Add 'const' to some node state query functions.
Add function for comparing time structs.
Fix sbinheap_delete()

This patch fixes a bug whereby sbinheap_node reference
pointers were pointing to incorrect nodes after the
deletion of an arbitrary node.