Componentwise Fractional Programming with Application to Resource Allocation