Check for readline in a separate function

Mxsh is able to use readline or a compatible library. This is checked
for in mx_mxsh.m4, and part of the result is used in configure.ac. It
would however be nice if that is done in a dedicated function so that
the result can easily be reused if more components ever need readline
support.

Move the checks for readline into mx_readline.m4. Set the result in
READLINE_LIBS, and use that in mx_mxsh.m4.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>