Interplaying roles of native topology and chain length in marginally cooperative and noncooperative folding of small protein fragments