sys/shell: correctly detect and handle long lines
sys/shell: correctly detect and handle long lines

The numeric value for EOF is -1. This caused the shell to return
the same code when EOF was encountered and when the line lenght was
exceeded. Additionally, if the line length is exceeded, the correct
behaviour is to consume the remaining characters until the end of
the line, to prevent the following line from containing (potentially
dangerous) garbage.

Co-authored-by: Hendrik van Essen <2104f687105764875e8addaa865b808f278c8927@fu-berlin.de>

OTAkeys/RIOT,kaspar030/RIOT,ant9000/RIOT,kYc0o/RIOT,ant9000/RIOT,miri64/RIOT,jasonatran/RIOT,basilfx/RIOT,miri64/RIOT,authmillenon/RIOT,OTAkeys/RIOT,miri64/RIOT,OlegHahm/RIOT,jasonatran/RIOT,miri64/RIOT,yogo1212/RIOT,OlegHahm/RIOT,ant9000/RIOT,miri64/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,yogo1212/RIOT,kYc0o/RIOT,kYc0o/RIOT,yogo1212/RIOT,basilfx/RIOT,kYc0o/RIOT,ant9000/RIOT,kaspar030/RIOT,kaspar030/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,OTAkeys/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,kYc0o/RIOT,OlegHahm/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,basilfx/RIOT,OlegHahm/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,basilfx/RIOT,authmillenon/RIOT,authmillenon/RIOT,ant9000/RIOT,kaspar030/RIOT,OTAkeys/RIOT,basilfx/RIOT,authmillenon/RIOT,kaspar030/RIOT,yogo1212/RIOT,yogo1212/RIOT,authmillenon/RIOT