autotools: Use pkg-config to check for libreadline This handles static linking properly and avoids overlinking. Change the --with-readline default to no as it was before and raise an error if libreadline couldn't be found. Do the same for libhistory.