Lut2: fix possibility that the value of lut comes out of the range.
Lut: Implement to take a function and evaluate it to make the lut.
Lut2: Implement to take a function and evaluate it to make the lut.
Merge pull request #5 from chikuzen/lut

Add function support to Lut/Lut2
Minor changes to the Lut/Lut2 patch
Add updated tests for Lut
Update lut documentation
Merge branch 'master' into cuda

Conflicts:
	doc/functions/lut2.rst