PERF: Implement get_freq_code in cython frequencies
There's a whole bunch of `tseries.frequencies` and `tseries.offsets` that should be moved into cython to improve `Period` (and `PeriodIndex, and to a lesser extend `Timestamp`) performance.  This PR just starts with the function `get_freq_code`.

To keep the PR small, there are a bunch of things it _doesnt_ do that can further improve things in follow-ups:
 - Nothing is cdef'd or declared in a pxd file
 - `_libs.period` still gets `get_freq_code` from `tseries.frequencies` instead of directly from `tslibs.frequencies`
 - A handful of now-duplicate constants in `tseries.frequencies` are not removed.

```
In [6]: per = pd.Period.now('min')
In [7]: %timeit per.month
```
Before:
```
The slowest run took 15.03 times longer than the fastest. This could mean that an intermediate result is being cached.
1000000 loops, best of 3: 1.4 µs per loop
```
After:
```
The slowest run took 25.64 times longer than the fastest. This could mean that an intermediate result is being cached.
1000000 loops, best of 3: 744 ns per loop
```

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
