Added load/unload functions for new style bridges that should not allocate memory or initialise the bridge functions.
Added debug option for linux and darwin (defaulted to optimize to maintain compatibility)
Fixed some issues found during unittesting.
Fixing incorrect sizeof.
Stop avis timer from adding more timers to the queue when it is shutting down.