Conversion from boolean to number implemented on OutputWriters.

Added a new property to BaseOutputWriter to control the conversion.

Documentation needs to be updated accordingly, but code seems to be sound.