Modified call-before-main mechanism

Added a new function (mbed_sdk_init) that can be used by the SDK itself to
do initializations before main() is called.