Ab initio study of van der Waals and hydrogen-bonded molecular crystals with a periodic local-MP2 method