Added hierarchical json flattening of associated models

Create a BaseModel with the following methods:

linkAssociations – Iterates over all parent (belongsTo) and straight (hasOne) associations. If the association includes our special foreignStore config we use the StoreManager to find the related record. The link to the related record is stored in a way in which Sencha Touch automatically picks it up.

linkChildAssociations – Used to fetch the direct children (hasMany) of the record and again stored in a way the default model handlers pick it up. 

getFlattenedData – Turns a hierarchical structure, fetched with getData, into a flat hash. The keys contain the relations in dot format. This way, the relations can be used for instance in a form panel. 

See http://appointsolutions.com/2012/07/using-model-associations-in-sencha-touch-2-and-ext-js-4/