Calculate maximum threat for hanging pieces

Use the max_threat() helper function to estimate more precisely the
best hanging piece threat.