Improve AABB computation for Compound and Box geometries.

Also fix a bug where margins are not taken in account by the AABB computation.