Add tests, bugfixes and some code polishing

- Add tests for libeventfeed
- Support 'make check'
- Support 'make coverage'
- Fix item updating error
- Other fixes and code polishing