DRILL-679: Support create table as query (CTAS) (contd.).

Continuation to e19606593f3173d8f82ca3074186e9ca7a960ce2.
Refactoring and align the writer interfaces similar to reader interfaces at the storage and file format level.
DRILL-674: Consider the view/table identifier given in CREATE VIEW/TABLE statements.