WIP: Fast transaction encode & decode

Current transaction use a bufferlist tbl to encode all actions and their data, so if object appears many times, it will be encoded many times. And when FileStore do this transaction, it must decode all actions and data from the tbl.

This patch follows BP: osd: update_Transaction_encoding, 

The transaction use two maps to keep all colls and objects appeared in the transaction, and each coll and object only need to be encoded once. On the other hand, FileStore don't need to decode actions, colls and objects anymore.
On Sun, 7 Dec 2014, Dong Yuan wrote:
> In src/os/ObjectStore.h:
> 
> > +      uint32_t pad; //we use pad to make TransactionData multiple of uint64_t
> > +
> > +      TransactionData() :
> > +        ops(0),
> > +	pad_unused_bytes(0),
> > +	largest_data_len(0),
> > +	largest_data_off(0),
> > +	largest_data_off_in_tbl(0) { }
> > +
> > +      void encode(bufferlist& bl) const {
> > +	bl.append((char*)this, sizeof(TransactionData));
> > +      }
> > +      void decode(bufferlist::iterator &bl) {
> > +	bl.copy(sizeof(TransactionData), (char*)this);
> > +      }
> > +    } __attribute__ ((packed)) ;
> I already added this line at the bottom of the file, but I still can't use ::encode(data, bl) to encode TransactionData in Transaction::encode.
> Did I missed something?

it is wonky for subclasses.  sometimes you need one inside the class 
and sometimes you need one at the end that does Parent::Subclass...