Factor out head list into its own class

Based on xiphux commit c0b25fa25eed194914866712b7b2ae7a76d7e497

TODO: finish the job and remove old Project class head list code

This is a part modified in my repo variant to show remote branches
log: quick fix of the logging feature