Foundation.php: added constructor/destructor for NSObject

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
CoreDataBase.php: added getter for delegate; added open(); added running a query

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>