Add a getPreviousFieldInCurrentLayer() method.

This method returns (if available) the field before the current one on the same layer.

Change-Id: I3568aa22244b23301617487ebcde04bb812c9206
Compute if the remaining fields must be merged when an empty field is removed.

When an empty field is removed, it can happen that two static or two dynamic
fields can be next one to the other. To prevent this, for every removed empty field, it computes
if the remaining fields should be merged. They can be merged if both are static or is both are dynamic.
If so, the concatWithNextField() method is called on the previous field.

Change-Id: Ie5a2309dfade72d345118d638cacafd8ada7e80a