Stability, permanence and optimal control of a Holling-II type trophic system with two sources and pulses