Add a singleton factory reference implementation
Add a spinlock reference implementation
Add a test program for spinlock implementation