Add linenoiseHistoryGet() to access to history. Fix redundant declaration 

I added API to access history to be able to replicate C-shell history functionality in my project.