Write and reload the composer.json when installing

Composer needs to know the new package we want to be installed.
Have Composer ignore composer.lock when installing

Unfortunately, the Installer class will silently fail to install a package
when there's a `composer.lock` file in the directory. Setting the update
flag overrides this behavior, but will also update other Composer packages.