Improve logging code and display

* Limit size of stored lines in memory (log.entries became a collections.deque with maxlen = 50000)
* Ensure log view dialog receiver is removed on dialog close
* Use numeric log levels instead of string prefix, easier to work with

 
![capture du 2013-07-03 14 56 06](https://f.cloud.github.com/assets/151042/743151/6535df54-e3e1-11e2-9cdc-9d402704bdf0.png)
![capture du 2013-07-03 14 56 12](https://f.cloud.github.com/assets/151042/743152/65319cb4-e3e1-11e2-8782-41a65ef7cd5c.png)