 BUG: Fix memory access violations in is_lexsorted 
Fixes the following segfault during tests:
```
running: pytest --skip-slow --skip-network X:\Python36\lib\site-packages\pandas
============================= test session starts =============================
platform win32 -- Python 3.6.3, pytest-3.2.3, py-1.4.34, pluggy-0.4.0
rootdir: ., inifile:
plugins: pep8-1.0.6, faulthandler-1.3.1, cov-2.5.1, palladium-1.1.0.1, celery-4.1.0
collected 15967 items / 2 skipped

. ...........................................X.....................................Windows fatal exception: access violation

Current thread 0x000012d4 (most recent call first):
  File "X:\Python36\lib\site-packages\pandas\tests\test_algos.py", line 1236 in test_is_lexsorted
  File "X:\Python36\lib\site-packages\_pytest\python.py", line 143 in pytest_pyfunc_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 265 in __init__
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 248 in _wrapped_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 613 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339 in _hookexec
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745 in __call__
  File "X:\Python36\lib\site-packages\_pytest\python.py", line 1169 in runtest
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 112 in pytest_runtest_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 265 in __init__
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 248 in _wrapped_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 613 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339 in _hookexec
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745 in __call__
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 182 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 196 in __init__
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 182 in call_runtest_hook
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 162 in call_and_report
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 82 in runtestprotocol
  File "X:\Python36\lib\site-packages\_pytest\runner.py", line 68 in pytest_runtest_protocol
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 265 in __init__
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 248 in _wrapped_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 613 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 265 in __init__
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 248 in _wrapped_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 613 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 265 in __init__
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 248 in _wrapped_call
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 613 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339 in _hookexec
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745 in __call__
  File "X:\Python36\lib\site-packages\_pytest\main.py", line 169 in pytest_runtestloop
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339 in _hookexec
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745 in __call__
  File "X:\Python36\lib\site-packages\_pytest\main.py", line 146 in _main
  File "X:\Python36\lib\site-packages\_pytest\main.py", line 110 in wrap_session
  File "X:\Python36\lib\site-packages\_pytest\main.py", line 139 in pytest_cmdline_main
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614 in execute
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334 in <lambda>
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339 in _hookexec
  File "X:\Python36\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745 in __call__
  File "X:\Python36\lib\site-packages\_pytest\config.py", line 58 in main
  File "X:\Python36\lib\site-packages\pandas\util\_tester.py", line 22 in test
  File "<string>", line 1 in <module>
```