Modernize build system.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Add a paste-in-place option.

Paste-in-place disables translation of copy-selections.
This is useful for slide-building, where you would like
copied selections to show up in the same place between slides.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Fix warnings in code.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>