Ray,
Nordic provide precompiled firmware called a Softdevice, which handles all the low level hardware control and Bluetooth protocol stacks, but its not an RTOS like the ESP8266 uses.
There are different Softdevices, depending on how much functionality you need from the Bluetooth. There are 3 different Softdevices for the nRF51822, called the S110,S120 and S130.
The current code from RedBearLab only supports the S130, which is the most full featured version, but takes 2K more ram to run than the S110. (from what I’ve read).
These Softdevices are not linked like a library, you flash them like a bootloader, and they run when the device starts up. However they don’t do much in their startup code, they just do a small amount of pre-initialisation and then call main() in the users code.
The sketch has to call into the Softdevice to initialise it fully and start it working.
After that, the loop() in the sketch seems to need to call ble.waitforevent();
It is possible to run an RTOS, I know several RTOSs were being ported to this platform.
However this is not a high performance device. Ram is only 16k in the base model nRF51822 and I think the Softdevice takes half of that.
Its also not a fast device, as its generally clocked at 16MHz.
But its designed for low power applications, and I think it does them very well.
If you want a new chip to play with this winter; you could do worse than buying a few of those eBay modules, as I’ve seen them as cheap as around $6 on ebay.
The only annoying thing is the physical pin arrangement on the module.
So if you are willing to splash some more cash, those motherboards would make the assembly process a lot neater.
Actually, I’m seriously considering designing a motherboard with a STM32F103 on it to act as the BMP. But I’m not sure when I’d have time to do it 
I will post my modified core on github, when i have tidied it up a bit, and If anyone wants a “warts and all” version I will zip it up and stick it on one of my virtual servers.