Linear Inviscid Damping in Sobolev and Gevrey Spaces