Prettified output of Zend\Code\Genator\ValueGenerator for multi-line arrays
Corrected ValueGeneratorTest
Merge pull request #5574 in develop
Corrected another failing test
Added unit tests
Removing double 'matrix' entry
Adding attributes to fieldsets. Legends are optional for fieldsets.

As the comment says: Every collection is wrapped by a fieldset if needed

A legend is not required for a fieldset.
* Now, if a label is specified, a legend will be created.
* Before, a fieldset would not be wrapped around the markup unless a label was set.
* Now, a fieldset will be wrapped around the markup if $this->shouldWrap is true, regardless if a label has been set for the legend.
Adding attributes to fieldsets, this allows for the space.
Fix getCurrentSchema error with MS SQL server
Update Connection.php
added AssertionAggregate and AssertionManager

AssertionAggregate allows aggregating multiple assertion to be associated with one ACL rule. This has been done without modifying a single file of existing code.

AssertionManager is a simple Plugin Manager allowing to declare Acl asseertions as services. It can be used by AssertionAggregate to add assertions by passing their service name. It could also by used by the Acl component itself, and should be declared as a default service, so that it could rely on Config service to get intialized, but those features would need to alter existing code and I didn't want to do that at this time.
minor styling fixes based on @samsonasik comments
changed the shareByDefault value to true for AssertionManager

there's no need for reinstantiating assertions each time it should be verified...
shorten a very long code line (not PSR2 compliant)
Update Connection.php
use static:: ; improved test
Fix in the Collection Element implementation

The current implementation of Collection Element imposes, in
prepareFieldset(), that the child element keys are set sequentially,
starting from 0. After that, populateValues() will remove the unused
indexes and add new ones, according to the input data. This behaviour
breaks the test in this commit, as it expects that the first key will
always be '0', which is not always true, as when collection elements
are dinamically added or removed with javascript. The changes done here
makes Collection Element more flexible and maybe a little faster, as it
saves resources by avoiding unnecessary creation of child elements,
adding them just when neccessary. Also, self::$lastChildIndex can be
sent along with the template, so javascript can set a proper index for
the next element to be added. FieldsetPrepareAwareInterface and all its
references were removed, as they are no longer necessary.
Add test from issue #5010
Ensures that collections with allow_remove don't re-create child elements if they all were removed
BaseInputFilter handles missing data properly

Previously BaseInputFilter::populate would pass a null value to setValue
this would cause the ArrayInput to throw an exception even if the
ArrayInput is not part of the validation group.

Something else that should be looked at is introducing a validator
instead of using a exception Zend\InputFilter\ArrayInput filter because
the exception will break the application if not managed correctly.