reformat code, inline some functions, add precondition checks
add rebates, check indices
Merge branch 'fix20131026'

Conflicts:
	QuantLib/ql/exercise.cpp
	QuantLib/ql/exercise.hpp