Image recording apparatus with a sheet-ejection controllable mechanism