Add input filter from elements before the form input filter

Input filters returned by the element getInputSpecification() are added
to the chains before the form input filters returned by
getInputFilterSpecification(). Also, it creates the replace() method in
BaseInputFilter, that allows the filters to be replaced without having
to remove them first. As the filters must be merged,
preferFormInputFilter must be set to false on the forms.