API: provide __dir__ method (and local context) for tab completion / remove ipython completers code
State: closed

closes #4501

this removes the ipython completers code and instead defines `__dir__`,
with a `_local_dir` that a class can override

NDFrame objects will have a pre-defined local of the info_axis (e.g. columns in a DataFrame)

for example:

```
In [1]: df = DataFrame(columns=list('ABC'))

In [2]: df.
Display all 199 possibilities? (y or n)
df.A                  df.at_time            df.corrwith           df.eq                 df.groupby            df.itertuples         df.min                df.reindex            df.shape              df.to_dict            df.tshift
df.B                  df.axes               df.count              df.eval               df.gt                 df.ix                 df.mod                df.reindex_axis       df.shift              df.to_excel           df.tz_convert
df.C                  df.between_time       df.cov                df.ffill              df.head               df.join               df.mul                df.reindex_like       df.skew               df.to_hdf             df.tz_localize
df.T                  df.bfill              df.cummax             df.fillna             df.hist               df.keys               df.multiply           df.rename             df.sort               df.to_html            df.unstack
df.abs                df.blocks             df.cummin             df.filter             df.iat                df.kurt               df.ndim               df.rename_axis        df.sort_index         df.to_json            df.update
df.add                df.boxplot            df.cumprod            df.first              df.icol               df.kurtosis           df.ne                 df.reorder_levels     df.sortlevel          df.to_latex           df.values
df.add_prefix         df.clip               df.cumsum             df.first_valid_index  df.idxmax             df.last               df.pct_change         df.replace            df.squeeze            df.to_panel           df.var
df.add_suffix         df.clip_lower         df.delevel            df.floordiv           df.idxmin             df.last_valid_index   df.pivot              df.resample           df.stack              df.to_period          df.where
df.align              df.clip_upper         df.describe           df.from_csv           df.iget_value         df.le                 df.pivot_table        df.reset_index        df.std                df.to_pickle          df.xs
df.all                df.columns            df.diff               df.from_dict          df.iloc               df.load               df.plot               df.rfloordiv          df.sub                df.to_records         
df.any                df.combine            df.div                df.from_items         df.index              df.loc                df.pop                df.rmod               df.subtract           df.to_sparse          
df.append             df.combineAdd         df.divide             df.from_records       df.info               df.lookup             df.pow                df.rmul               df.sum                df.to_sql             
df.apply              df.combineMult        df.dot                df.ftypes             df.insert             df.lt                 df.prod               df.rpow               df.swapaxes           df.to_stata           
df.applymap           df.combine_first      df.drop               df.ge                 df.interpolate        df.mad                df.product            df.rsub               df.swaplevel          df.to_string          
df.as_blocks          df.compound           df.drop_duplicates    df.get                df.irow               df.mask               df.quantile           df.rtruediv           df.tail               df.to_timestamp       
df.as_matrix          df.consolidate        df.dropna             df.get_dtype_counts   df.isin               df.max                df.query              df.save               df.take               df.to_wide            
df.asfreq             df.convert_objects    df.dtypes             df.get_ftype_counts   df.iteritems          df.mean               df.radd               df.select             df.to_clipboard       df.transpose          
df.astype             df.copy               df.duplicated         df.get_value          df.iterkv             df.median             df.rank               df.set_index          df.to_csv             df.truediv            
df.at                 df.corr               df.empty              df.get_values         df.iterrows           df.merge              df.rdiv               df.set_value          df.to_dense           df.truncate           

```


Labels:

Comments:
@jtratner done

@jtratner @cpcloud anything further, merge?

I want to look again but can't right now.

actually, aside from the one change I think we should make I'm fine with it.  If you want to do sorted that's fine too.  But it needs to be list(sorted, because sorted returns generator in python 3

not sure `sorted` even matters (as I belive ipython does but...ok)

@cpcloud `object__dir__` doesn't exist by default, `dir` must do some kind of fallback with it