Enable IsTrimmable+IsAotCompatible on all sample projects, fix warnings (#21892)