merge lz4 from illumos

- merge lz4 from illumos
- add some optimisations for linux