A nonmonotone trust-region algorithm with nonmonotone penalty parameters for constrained optimization