Improve performance of markets
Improve performance of markets

Always check whether a change is required *before* entering
database::modify() and do not call modify() if no change is necessary.

bitshares/bitshares-2,bitshares/bitshares-2,bitshares/bitshares-2,bitshares/bitshares-2