3D Scene in VSE: Hide an object keeping the shadow
As of Version 2.79 Cycles has an option to make an object a shadow catcher.



From the release notes 


  This option will make object to only receive shadows in a way that it could be alpha-overed onto another image.