Support map-only streaming jobs

If the number of reducers is 0, Hadoop won't even run the reduce phase
of the job.  So in that case, the mapper should write output directly
instead of serializing the key/value.