Always assign Vloc register 0.

Summary: Currently we assign a const register to DefConst's results,
but if a non-DefConst instruction has a const result, we assign
0 registers. With this diff, Vloc.reg(0) always holds a valid
register. reg(1) is still optional; if a subtype of Gen has a
known DataType, or can be given a SIMD register, then it only
gets 1 register instead of 2.

After this lands we can start removing lots of code that checks
for InvalidReg (it will never happen), or refactor it to check
SSATmp::isConst() rather than the presence of a register.

Reviewed By: @ottoni

Differential Revision: D1554886
Implement ZipFile::lock() to proxy to its inner stream

Summary: Fixes a segfault when trying to flock() a gzopen()'d file.

Reviewed By: @fredemmott

Differential Revision: D1553405
Optimize strtr

Summary: For an input string of length n, and a replacement array with
minlen and maxlen as the pattern string lengths, strtr() makes
O(n * (maxlen - minlen)) calls to Array::exists().

Since the input string is different each time, Array::exists() has
to compute the hash of the string every time.

This diff optimizes strtr() for the case when the replacement
array has less than 64 elements. It uses a 64 bit bitmask to
compute if a potential match exists, and makes the Array::exists()
calls if the possibility of a match is not eliminated.

Reviewed By: @markw65

Differential Revision: D1546956