Improves classification demos.

Now you can choose between three kernels:
 - Gaussian with sigma parameter
 - Linear
 - Polynomial with degree parameter

Some code refactoring, too.