Merge pull request #3 from nouiz/GSoC2014_part2

Fix max memory counter.
updates
fixes
update new algo
Something wrong with the mem_freed
this is my undone version, the mem_freed cannot work well now.
fix
maybe a better way but still need to modify and test
Updates
change to dependencies solution
move current and bound check position
remove an unused line
one fix
working version:)
Updates:)
Updates and fix algo
Add min peak memory as a theano config variables
use THEANOFLAGS=profiling.min_peak_memory=True to set it on
update test file with new config setting
Update Theano doc about config.profiling.min_peak_memory
Algo updates
speed is low
Algo updates
Runtime: 2-3 mins