Linear inviscid damping for monotone shear flows in a finite periodic channel, boundary effects, blow-up and critical Sobolev regularity