Fixed history handling.
Fixed history handling.

- The wraparound handling when using the history with the 'back' button is actually depending on history_last being unsigned (which is the default for cc65) so define it explicitly as unsigned to make it work on other targets too.
- As there's no 'forward' button it doesn't make sense to keep history entries after using them with the 'back' button. Clearing them on use on the other hand avoids an "infinite history".

MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,bluerover/6lbr,bluerover/6lbr,arurke/contiki,arurke/contiki,bluerover/6lbr,arurke/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,bluerover/6lbr,MohamedSeliem/contiki,bluerover/6lbr,bluerover/6lbr,arurke/contiki,bluerover/6lbr