Convert code to be php5.3 compatible

fixed code to be compatible with 12.04 LTS

fixed broken tests and added types convertions

Change-Id: I8a39e7ea76ca9a183cc435d74482a2a79ab3a302
Implements: blueprint openid-oauth2-php53-complaint