ENH: support .strftime for datetimelikes (closes #10086)
closes #10086 

this works for `DatetimeIndex`, something broken for `PeriodIndex`. And should not work for `TimedeltaIndex` (as I don't think the `strftime` codes are meaningful). Further want to actually define `.strftime` on the index itself as well (maybe `def strftime(self, format):`).

needs tests for the same
 that makes sense

I've added to both `DatetimeIndex` and `PeriodIndex`. Also added a few tests. 
 pls add strftime to API.rst 
also I think a mini section in time series.rst would be ok too
 @jreback it's updated 
 @jreback I added a mini section to `basics.rst` instead, but otherwise this is ready for review 
 can you update for comments. also related to #10442. I want _this_ method to be the 'primary' date-string formatting (though `.astype(str)` will be supported by calling what this calls, namely `.format`), but this should be the goto method

copy your example that you added to basics.rst and put in 0.17.0 (in a separate section, maybe datetime-string formatting or somesuch)
 @jreback updated according to your comments except for one thing: I couldn't actually find an invalid formatting string that would cause `strftime` to raise an exception 
 We also have a `tslib.format_array_from_datetime` function. Can you check if this is faster? (also uses `strftime`, but the loop is cythonized)
 @jorisvandenbossche sure I'll check  
 @jorisvandenbossche this calls `.format(date_format=...)` which ultimately calls the cython `tslib.format_array_from_datetime`, so this is just syntatic sugar.
 @jreback reordered the `lambdas` and the `if/else` as you suggested, also added more unit tests
 ok, lgtm. ping when green.
 sure will do 
 @jorisvandenbossche @jreback updated to return `ndarray` instead of `list` 
 @jorisvandenbossche @jreback it's green now, please take a look 
 @mortada couple of comments. ping when green.
 @jreback updated, please take a look 
 thanks!
