Refactoring and code changes

This commit is an effort to hit the peak of master of dev@openvswitch.org.

Code was also refactored to improve lisibility.

Hashes were added to improve performance.

The changes are based upon https://github.com/Samuel-Ghinet/openvswitch-hyperv-kernel.git