Add tests for LayerStack::ApproximateMatch

Also:
* Fix a bug in approximate match calculation where the number of
differing fields was always zero.
* Add some documentation.

Bug: 180669092
Test: libcompositionengine_test

Change-Id: I89d6d3f3298615e6b964b053d12127143e2dc060
4 files changed