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

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