Longest Valid Parentheses

http://leetcode.com/onlinejudge#question_32
input output expected
"()(()" 4 2
Rollback
Revert "Rollback"

This reverts commit 700c089a32c54d2841a255c0a3fa544872a6a194.
Passed all

Need to due with missing closing in the end case, which is very hard;
bypass it by do the same process from right to left (increase credit
when closing and decrease when opening), which will also have the
missing opening in the front problem, but we select the bigger solution
to return.