Prevent Matlab on OS X from crashing on error

Replace CHECK() and LOG(FATAL) with LOG(ERROR) and mexErrMsgTxt

A failed CHECK() or LOG(FATAL) causes Matlab to crash on OS X 10.9 with Matlab 2014a.
fixed tanh to not return NaN for input values outside the range [-40, 40]
Fixed header order to satisfy linter
Merge pull request #1455 from seanbell/tanh-fix

Fix tanh layer for badly scaled input values
remove redundant code in ConvolutionLayer::Reshape
Merge pull request #1505 from longjon/conv-dedup

Remove redundant code in ConvolutionLayer::Reshape
Better instructions for updating Homebrew after modifying formulae

Previous instructions glossed over how to deal with OpenCV-related update problems
Update mean file help

Numpy array dimensions should be [Channels x Height x Width], NOT [Height x Width x Channels]

If an image mean file is supplied with channels as the last dimension, classify.py throws errors like:

ValueError: operands could not be broadcast together with shapes (3,227,227) (256,0,225) (3,227,227)
clarify #endif comment
Merge pull request #1527 from drdan14/classify-py-mean-dims

Update mean file help
Merge pull request #1516 from drdan14/update-homebrew-install-instructions

Better instructions for updating Homebrew after modifying formulae
Merge pull request #1406 from CellScope/matcaffe-osx-fix-crash-on-error

Prevent Matlab on OS X from crashing on error
Created parse_log.py, competitor to parse_log.sh
Take train loss from `Iteration N, loss = X` lines

Was previously using `Train net output #M: loss = X` lines, but there may not be exactly one of those (e.g., for GoogLeNet, which has multiple loss layers); I believe that `Iteration N, loss = X` is the aggregated loss.

If there's only one loss layer, these two values will be equal and it won't matter. Otherwise, we presumably want to report the aggregated loss.
Store data in lists of dicts and use csv package

Output format is unchanged (except that csv.DictWriter insists on writing ints as 0.0 instead of 0)
Merge pull request #1384 from CellScope/log-parser-python

Python log parser
Check input line count in HDF5 data layer
remove extra blank line
consolidate build rules for object files
automatic discovery of source directories