Only ignore hashbang line in cli mode

Summary: @​see https://github.com/php/php-src/blob/master/sapi/cli/php_cli.c#L606
Closes https://github.com/facebook/hhvm/pull/4183

Reviewed By: @JoelMarcey

Differential Revision: D1669155

Signature: t1:1669155:1415548679:cbc90bcbd8331cd54018590dab2747f7d6a28813
Improve fix for issue #4111

Summary: Closes https://github.com/facebook/hhvm/pull/4180

Reviewed By: @JoelMarcey

Differential Revision: D1669151

Signature: t1:1669151:1415548684:b89950d6e0f02fa8a4fc4bc0a9b17d4fb5835a07