Fix leak from unclosed shared imports
Fix leak from unclosed shared imports

ion_cli_open_writer was not setting the writer context's has_imports to
true after adding shared imports, which resulted in the imports not
being closed when the writer was closed.

amzn/ion-c,amzn/ion-c,amzn/ion-c,amzn/ion-c