generalize and fix select legalization code
remove incorrect warning (ExpandI64 is a new pass of ours) and fix a compilation warning
assume worst-case alignment in PromoteIntegers, as we actually break on unaligned operations
suppress warnings on default nacl globals
Merge pull request #8 from sunfishcode/master

Here are a few patches that I made while getting started with the code.
Create a test directory for JS Codegen
Minor whitespace tidying.
Change some dyn_casts to casts.
Use more LLVM-idiomatic debug and error facilities.
Map optimizations.
Disable more unnecessary PNaCl passes.

To help this, JSBackend.cpp is changed to use DataLayout to get a type
size instead of relying on getPrimitiveSizeInBits, so that it works with
pointer types, and the ExpandI64 pass is changed to not modify the
llvm.lifetime intrinsics.

And this changes some const Type* to plain Type*. Type is immutable, so
many APIs do not support using const with it.
Use the LLVM pass-manager infrastructure for DataLayout.
Constify more things.
Drop the SimplifyAllocas pass.

The JS backend doesn't need to worry as much about types in the way that the CPP
backend did, so all this pass is doing is saving a little stack space in rare
cases. If these stack savings are important, this should really be handled in
the optimizer proper rather than in a JSBackend-specific pass.
Improve an assert message.
Disable an unnecessary optimization pass.
Add a few more example tests.