Added writeTypeTag option to serialize function

The following commits from your working branch will be included:

commit 6c57238c99293dbb5783ea405120d863ffacf2c9
Author: Markus Holzemer <markus.holzemer@gmx.de>
Date:   Mon Nov 17 16:59:49 2014 -0800

    Added writeTypeTag option to serialize function

Change-Id: I252f96942a7bedfcc3633a07ad02793c278660ed
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/180
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
index 463c228..cb3849a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
@@ -185,11 +185,16 @@
         return new ARecordType(null, fieldNames, fieldTypes, true);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void serialize(ARecord instance, DataOutput out) throws HyracksDataException {
+        this.serialize(instance, out, false);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void serialize(ARecord instance, DataOutput out, boolean writeTypeTag) throws HyracksDataException {
         IARecordBuilder recordBuilder = new RecordBuilder();
         ArrayBackedValueStorage fieldValue = new ArrayBackedValueStorage();
+        
         recordBuilder.reset(recordType);
         recordBuilder.init();
         if (recordType != null) {
@@ -199,7 +204,7 @@
                 recordBuilder.addField(i, fieldValue);
             }
             try {
-                recordBuilder.write(out, false);
+                recordBuilder.write(out, writeTypeTag);
             } catch (IOException | AsterixException e) {
                 throw new HyracksDataException(e);
             }