Allow pack.js to take a list of files from stdin.

Summary:
This will make it easier to move to the new make framework, which
wants to be able to specify inputs explicitly.

Allow the outfile to be specified explicitly on the commandline.

Again, this is useful to the make system.

Use slice() instead of splice(), to not mutate global state.

Test Plan:
% node build/pack.js questions/7b6LRebCgb4.yaml
questions/7b6LRebCgb4.yaml

% node build/pack.js questions/7b6LRebCgb4.yaml questions/Vi1JK6IYVt8.yaml
questions/7b6LRebCgb4.yaml
questions/Vi1JK6IYVt8.yaml

% node build/pack.js
questions/-4kGMI-qQ3I.yaml
questions/-a_w0_VAo6U.yaml
questions/0JW9P_T4P_Y.yaml
questions/3XOt1fjWKi8.yaml
questions/5-ZFOhHQS68.yaml
questions/7XaftdE_h60.yaml
questions/7b6LRebCgb4.yaml
questions/By-ggTfeuJU.yaml
questions/CEdXvoAv_oM.yaml
questions/CQYELiTtUs8.yaml
questions/D1NubiWCpQg.yaml
questions/IgYUR7aFY-c.yaml
questions/Io9i1JkKgN4.yaml
questions/J97G6BeYW0I.yaml
questions/K57qjYYjgIY.yaml
questions/U2ovEuEUxXQ.yaml
questions/Vi1JK6IYVt8.yaml
questions/VidnbCEOGdg.yaml
questions/WPimvspI0_c.yaml
questions/bm65xCS5ivo.yaml
questions/hJ18CrKU3Zc.yaml
questions/oNgo9bbDi7Q.yaml
questions/ou9YMWlJgkE.yaml
questions/xyAuNHPsq-g.yaml

socrates% build/pack.js questions/-4kGMI-qQ3I.yaml::/var/tmp/foo.js
questions/-4kGMI-qQ3I.yaml => /var/tmp/foo.js

socrates% build/pack.js questions/-4kGMI-qQ3I.yaml
questions/-4kGMI-qQ3I.yaml => questions/-4kGMI-qQ3I.yaml.js

socrates% build/pack.js
questions/-4kGMI-qQ3I.yaml => questions/-4kGMI-qQ3I.yaml.js
questions/-a_w0_VAo6U.yaml => questions/-a_w0_VAo6U.yaml.js
questions/0JW9P_T4P_Y.yaml => questions/0JW9P_T4P_Y.yaml.js
questions/3XOt1fjWKi8.yaml => questions/3XOt1fjWKi8.yaml.js
questions/5-ZFOhHQS68.yaml => questions/5-ZFOhHQS68.yaml.js
questions/7XaftdE_h60.yaml => questions/7XaftdE_h60.yaml.js
questions/7b6LRebCgb4.yaml => questions/7b6LRebCgb4.yaml.js
questions/By-ggTfeuJU.yaml => questions/By-ggTfeuJU.yaml.js
questions/CEdXvoAv_oM.yaml => questions/CEdXvoAv_oM.yaml.js
questions/CQYELiTtUs8.yaml => questions/CQYELiTtUs8.yaml.js
questions/D1NubiWCpQg.yaml => questions/D1NubiWCpQg.yaml.js
questions/IgYUR7aFY-c.yaml => questions/IgYUR7aFY-c.yaml.js
questions/Io9i1JkKgN4.yaml => questions/Io9i1JkKgN4.yaml.js
questions/J97G6BeYW0I.yaml => questions/J97G6BeYW0I.yaml.js
questions/K57qjYYjgIY.yaml => questions/K57qjYYjgIY.yaml.js
questions/U2ovEuEUxXQ.yaml => questions/U2ovEuEUxXQ.yaml.js
questions/Vi1JK6IYVt8.yaml => questions/Vi1JK6IYVt8.yaml.js
questions/VidnbCEOGdg.yaml => questions/VidnbCEOGdg.yaml.js
questions/WPimvspI0_c.yaml => questions/WPimvspI0_c.yaml.js
questions/bm65xCS5ivo.yaml => questions/bm65xCS5ivo.yaml.js
questions/hJ18CrKU3Zc.yaml => questions/hJ18CrKU3Zc.yaml.js
questions/oNgo9bbDi7Q.yaml => questions/oNgo9bbDi7Q.yaml.js
questions/ou9YMWlJgkE.yaml => questions/ou9YMWlJgkE.yaml.js
questions/xyAuNHPsq-g.yaml => questions/xyAuNHPsq-g.yaml.js

meta.856 [argv] socrates% build/pack.js
questions/-4kGMI-qQ3I.yaml => questions/-4kGMI-qQ3I.yaml.js
questions/-a_w0_VAo6U.yaml => questions/-a_w0_VAo6U.yaml.js
questions/0JW9P_T4P_Y.yaml => questions/0JW9P_T4P_Y.yaml.js
questions/3XOt1fjWKi8.yaml => questions/3XOt1fjWKi8.yaml.js
questions/5-ZFOhHQS68.yaml => questions/5-ZFOhHQS68.yaml.js
questions/7XaftdE_h60.yaml => questions/7XaftdE_h60.yaml.js
questions/7b6LRebCgb4.yaml => questions/7b6LRebCgb4.yaml.js
questions/By-ggTfeuJU.yaml => questions/By-ggTfeuJU.yaml.js
questions/CEdXvoAv_oM.yaml => questions/CEdXvoAv_oM.yaml.js
questions/CQYELiTtUs8.yaml => questions/CQYELiTtUs8.yaml.js
questions/D1NubiWCpQg.yaml => questions/D1NubiWCpQg.yaml.js
questions/IgYUR7aFY-c.yaml => questions/IgYUR7aFY-c.yaml.js
questions/Io9i1JkKgN4.yaml => questions/Io9i1JkKgN4.yaml.js
questions/J97G6BeYW0I.yaml => questions/J97G6BeYW0I.yaml.js
questions/K57qjYYjgIY.yaml => questions/K57qjYYjgIY.yaml.js
questions/U2ovEuEUxXQ.yaml => questions/U2ovEuEUxXQ.yaml.js
questions/Vi1JK6IYVt8.yaml => questions/Vi1JK6IYVt8.yaml.js
questions/VidnbCEOGdg.yaml => questions/VidnbCEOGdg.yaml.js
questions/WPimvspI0_c.yaml => questions/WPimvspI0_c.yaml.js
questions/bm65xCS5ivo.yaml => questions/bm65xCS5ivo.yaml.js
questions/hJ18CrKU3Zc.yaml => questions/hJ18CrKU3Zc.yaml.js
questions/oNgo9bbDi7Q.yaml => questions/oNgo9bbDi7Q.yaml.js
questions/ou9YMWlJgkE.yaml => questions/ou9YMWlJgkE.yaml.js
questions/xyAuNHPsq-g.yaml => questions/xyAuNHPsq-g.yaml.js
meta.857 [argv] socrates% build/pack.js questions/3XOt1fjWKi8.yaml
questions/3XOt1fjWKi8.yaml => questions/3XOt1fjWKi8.yaml.js

Reviewers: desmond

Reviewed By: desmond

CC: alpert

Differential Revision: http://phabricator.khanacademy.org/D4554