Apparatus for inspecting the thickness of a banknote