Gannett merger marks shift for troubled American newspaper giant