Fix for DataFrame.hist() with by- and weights-keyword
closes https://github.com/pydata/pandas/issues/9540

for example:

``` python
import pandas as pd
d = {'one' : ['A', 'A', 'B', 'C'],
     'two' : [4., 3., 2., 1.],
     'three' : [10., 8., 5., 7.]}     
df = pd.DataFrame(d)
df.hist('two', by='one', weights='three', bins=range(0, 10))
```

does not seem to break anything, but this is my first meddling in the pandas library, so a review would be nice

Just gave a quick look through here. This is a good idea that we should support.

We'll need tests for this. Put them in `pandas/tests/test_graphics.py`. Make sure to cover cases where
- `by` is None or a column
- `weights` is an array of weights or a string column
- `values` has missing data and / or `weights` has missing data

The plotting stuff is being refactored a bunch currently, so I've tagged this for the 0.18. You might want to hold off on making more changes, but in the meantime you can write tests for this.
 FYI the checking is quite similar to how weights are checked for `DataFrame.sample`, so would want to make this a common function (could be a private function on a dataframe)
 Thanks jreback, I will try my best to add some tests. I will also check what can be done with synching dropna with the weighs.

I was thinking in the lines of
drow rows in weighs, that are na in group
drop rows na in group
fillna in weighs with zero, so they do not count to anything

would this be ok?
 Or more logical to drop all rows that are NA in group or in weights?
 I'd say your lest method. Something like `data.dropna(subset=['group', 'weight'])`
 @TomAugspurger can you review
 Sorry I have not had time to continue with the tests, my limited git knowledge made it tough interacting with the repo. I planned to look how my patch worked with the new release
 Added a new pull request here: https://github.com/pydata/pandas/pull/11441

for the new version, sorry for not using git correctly :(
 Superseded by #11441
