Use directory-style database for bootstrapping database

Summary:
This allows GHC HEAD to be bootstrapped using 7.10.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: austin

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D589

GHC Trac Issues: #9652