add contracts to Core
add contracts to Core

Summary:
- Add class-level description including states & state-transitions
- Add method-level contracts to Core

Reviewed By: yfeldblum

Differential Revision: D7923362

fbshipit-source-id: f7b0f340b6a768c33068547aa4a38acc72ad7088

facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly