account_asset_managements: tests and huge performance improvements

Hi Luc,

Here is a significant performance improvement which is much necessary to handle a large amount of assets (~1000).

It reduces the number of SQL requests by several orders of magnitude when recomputing the depreciation values in parent assets.

Plus a basic test suite.