Sort trade offers and replace add_mdex_fields

This is the continuation of @faizkhan00's #197.

The result of `getorderbook_MP`, `gettradessince_MP` and `gettradehistory_MP` is sorted based on block height and position of a transaction within a block by using the `MetaDEx_compare` comparator.

This further replaces `void add_mdex_fields(Object *metadex_obj, CMPMetaDEx obj, bool c_own_div, bool c_want_div, string eco)` with:

```
void MetaDexObjectToJSON(const CMPMetaDEx& obj, Object& metadex_obj)
void MetaDexObjectsToJSON(std::vector<CMPMetaDEx> vMetaDexObjs, Array& response)
```

I did not include the code / style format, but I'd be happy to push it, once this is merged.
Good to know, thanks.