common/crc32c: refactor a bit

- the generic function without the _le suffix (useless)
- use a static global so that detection only happens once
- make the structure a bit cleaner to plug in new implementations

Signed-off-by: Sage Weil <sage@inktank.com>
crc32c: remove old intel implementation

The license is not LGPL compatible.

Signed-off-by: Sage Weil <sage@inktank.com>
crc32c: add intel baseline algorithm

This is than the sctp code but probably slower.  We'll add it anywhere
just as a reference and to have a baseline for comparing performance.

Signed-off-by: Sage Weil <sage@inktank.com>
crc32c: note intel crc code copyrights

It's a BSD 3-clause.

Signed-off-by: Sage Weil <sage@inktank.com>
build-depend on yasm

Signed-off-by: Sage Weil <sage@inktank.com>
yasm-wrapper: hide libtool insanity from yasm

libtool passes all kinds of crap to yasm that yasm does not understand.
Hide it with this ugly wrapper.  Sigh.

Signed-off-by: Sage Weil <sage@inktank.com>
arch: add cpu probing

For now, just a check to see if we have SSE4.2.

Signed-off-by: Sage Weil <sage@inktank.com>
crc32c: add intel optimized crc32c implementation

This is from Intel's ISA-L library and licensed under BSD 3-clause.

It needs to build with yasm, which means we go through all sorts of pain
to make this work with libtool:

 - strip out args it doesn't understand with yasm-wrapper
 - detect whether it is recent enough during configure

The code is conditional on:

 - build-time support (yasm)
 - run-time support (sse4.2)

Signed-off-by: Sage Weil <sage@inktank.com>
Makefile: move all crc code into libcrc.la

This is simpler.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #520 from ceph/wip-crc

This is better, faster intel optimized code.

Reviewed-by: Yehuda Sadeh <yehuda.sadeh@inktank.com>