Adding custom support for boolean casting based on connection

The default PHP boolean-to-string casting does not work for some
database connection types (e.g. PostgreSQL).  Added a BOOLEAN
type to the Column class, and then the cast() method delegates
to the a new boolean_to_string() method in the Connection class.

By default the boolean_to_string() method returns the standard
PHP string cast for the boolean, retaining the original behavior.
This method can be overridden in adapter classes to provides custom
casting of boolean values.

Added an overridden boolean_to_string() method into the
adapters/PgsqlAdapter.php class which casts the boolean values
false and true to the strings "0" and "1" respectively.  These
string values are then recognized by the Postgres database as
boolean values, as opposed to the values "" and "1" generated
by the standard PHP cast.
Updated ColumnTest for new BOOLEAN type cast
Updates to allow for easy access/serialization of virtual attributes

Changed ActiveRecord\Model so that the __get() method will look for
a method with the same name as the property requested, in addition
to looking for the get_property_name() getter method.

Changed ActiveRecord\Serialization so that the check_methods() method
will look for a getter method in the form of "get_method_name" if it
can't find a method "method_name" in the class. This allows custom
attributes to be easily included in serialization.
unit test for ActiveRecord\Serialization update
PgsqlAdapter fixes for boolean and default values

- Added custom boolean_to_string() conversion method to handle
PHP "false" values as well as what PostgreSQL accepts as
"false"

- Updated the query_column_info() method to use pg_get_expr(adbin, adrelid)
for getting the default value from pg_attrdef instead of querying adsrc
directly.  This is the PostgreSQL recommended way of doing it:
http://www.postgresql.org/docs/9.0/static/catalog-pg-attrdef.html

- Moved the regex processing to extract the default column value from
the sql query into PHP.  This makes the query a little more lightweight
and offloads the work from the database to the web server.

- Added an extra regex to the the default value processing to turn escaped
single quotes ('') back into a single quote (').
custom logging method for query log
Merge branch 'add_boolean_value_cast' into current
Merge branch 'virtual_attributes' into current
Merge branch 'boolean_and_defaults' into current

Conflicts:
	lib/adapters/PgsqlAdapter.php
Merge branch 'custom_logger' into current
Added regex for integer casting in Column::cast()

The cast() method in the Column class was casting integer values
with "(int)$value".  If the value was formatted as a number like
"80,000" then this would reduce it to "80".  Added a regex to strip
any non-digits before casting it:

$value = (int)preg_replace("/\D/","",$value);
Merge branch 'integer_cast' into current
fixed indentation formatting to match existing code
Merge branch 'master' into current

Conflicts:
	lib/Connection.php
Merge branch 'master' into add_boolean_value_cast
Updated tests for boolean value casting

Updated the ColumnTest::assert_cast() to test that boolean values are
being casted using the Connection boolean_to_string() method.

Added a PostgreSQL specific test to ensure that boolean values are
being casted as the correct string value.
Updated PgsqlAdapter boolean_to_string() for Postgres boolean values

Modified the boolean_to_string() method in the PgsqlAdapter class to
properly convert values that PHP considers a boolean, as well as
what PostgreSQL considers a boolean value.

E.g., PostgreSQL considers the values 'f', 'false', 'n', 'no', and
'off' as valid values for `false`, but PHP does not.  The original
implementation of this method would return `true` for one of these
values which is incorrect for a PostgreSQL database.

Also modified the base Connection class boolean_to_string() method
to first cast its `$value` parameter as a boolean before casting
it to a string.  This will account for PHP's loose type-casting
and make sure the method returns a consistent casted value.
Merge branch 'add_boolean_value_cast' into current

Conflicts:
	lib/adapters/PgsqlAdapter.php
Shortened the false condition in PgsqlAdapter::boolean_to_string()

While the previous version was explicit and descriptive, it wasn't
that elegant.  This is much nicer.
Fix PgsqlAdapter native types, default values.

* The native types array were missing 'real','bigint','smallint', 'double precision', 'decimal' and 'numeric'.  See: http://www.postgresql.org/docs/9.1/static/datatype-numeric.html
* Both 0 and the empty string "" are valid defaults but were not being recognized.  Changed to check explicitly for NULL defaults.