Feature/trim connections

This feature branch enables trimming of relay connections if it is not the best connection. This feature is experimental and is disabled by default because more testing is required to make sure that it does not crash the node.