Add get_num_examples() method

So far, it is impossible to get the number of examples without getting a
matrix directly which is only possible on dense_design_matrix and
sparse_dataset with get_design_matrix() method.

This commit adds a method get_num_examples() which returns the number
of examples in the dataset. It also deprecates the attribute num_examples
of dense_design_matrix in favor of Dataset.get_num_examples().
Use new method Dataset.get_num_examples in SGD

Previous PR #733 broke sgd.py for datasets with no get_design_matrix()
method and for settings with no monitoring datasets.

This commit makes use of new method Dataset.get_num_examples to avoid
using DenseDesignMatrix specific methods and allows no monitoring
datasets.
Added get_num_examples to TransformerDataset

(Modified by DWF: Use Vincent's wraps from pylearn2.utils instead.)
Fix pep8 issues and remove test_sgd from white list
Merge pull request #971 from dwf/get_num_examples_squash

Rebase & squash of get_num_examples #880