core: fix search/insert of elements in sorted arraylist with duplicates

The pointer and index returned is now the first element found with the value
(with the lower index if there are many elements with same value).
And the index for insert is the last element with same value + 1
(the higher index + 1).
core: add a .mailmap file

This file is used for example by command "git shortlog", to prevent duplicate
committers.