Moves the searchEOL function from basicide to a general purpose utility function in the basic module. This also adds some unit tests for it. Change-Id: I8f446990654415a994b7964dd62706f3204d817a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207060 Tested-by: Jenkins Reviewed-by: Neil Roberts <nroberts@libreoffice.org>