public static byte[] getCellKeySerializedAsKeyValueKey(final ExtendedCell cell) {
    if (cell == null) return null;
    byte[] b = new byte[KeyValueUtil.keyLength(cell)];
    KeyValueUtil.appendKeyTo(cell, b, 0);
    return b;
  }
This method exists just to encapsulate how we serialize keys. To be replaced by a factory that
we query to figure what the Cell implementation is and then, what serialization engine to use
and further, how to serialize the key for inclusion in hfile index. TODO.
@return The key portion of the Cell serialized in the old-school KeyValue way or null if passed
        a null <code>cell</code>
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java