Code fix in firefox addon to work with new varnam-daemon

removed api from the http request
changed learn function to send content as json string