cli tools and 0.8 preparation

Based on #189 

Sync with doctrine/DoctrineModule#226