Singleton DB and minor bug fix

Changed the database connection to object oriented singleton model. Also
fixed a bug where customers could order items that were not in stock.
These items are still in the system, but if a customer tries to add them
into cart he gets a message informing him they are out of stock.
Merge pull request #3 from daniel-bene/master

Singleton DB and minor bug fix