Clarify OSR in manual

(manually cherry picked from commit 44fe31c73f6e2070b2fc761614d039627afcf82c)
Clarify description of histval for stochastic simulations

(cherry picked from commit acf688c17822877ce2cdad79dc0a3234addc9cb3)
Filter out more pathological cases in osr1.m

(cherry picked from commit a8c04e3ed5f2ca8c394a4a5e78817cb18f154d17)
Fix formatting problems introduced in 44fe31c7.

(manually cherry picked from commit 59696026e948378fa60c6030a1373ea089947efb)
Correct placement of @end example in manual

(cherry picked from commit e6fadde9e23b2612442a1351c7bca1c102eeb654)
Fix an invalid memory access in k_order_perturbation DLL.

In the case where a 2nd/3rd derivative is symbolically not zero but numerically
zero at the evaluation point, the last lines of the g2/g3 matrices (in
KordpDynare::calcDerivativesAtSteady()) where uninitialized (these matrices
store the sparse hessian/3rd-deriv in coordinate list form, i.e. with 3 columns
and as many rows as non-zero elements). When reconstructing the dense
hessian/3rd-deriv matrix out of g2/g3, this would result in invalid memory
accesses.

(cherry picked from commit 050b495a526c1adafc7ce6ca4e9fc5ff8a1bbd7c)
Fix call to "mex" helper under MATLAB 8.3 (R2014a) and GNU/Linux.

There is a new LINKOPTS variable which governs the list of symbols to be
exported, so we set it to an empty value to have all symbols exported.
Previously we were overloading the LDFLAGS which was containing the list of
exported symbols.

(cherry picked from commit 9aabb82c7662205699dd8a3ca400d878835d6ab2)
Fix invalid check for size of interval in Geweke

Prevents specifying different interval values

(cherry picked from commit 2c9c585d6efa66cdab1139dd9daed956d8b03731)
changes related to #641 for os x

(cherry picked from commit 4973aa986ee001bf4daa9f6288904d6f78da50a0)
add missing semicolon
(cherry picked from commit b0546cd939476c0267cba4d28ab998559c08b0e8)
Fix doc for oo_.{Smoothed,Updated,Filtered}Variables and oo_.SmoothedShocks.

(cherry picked from commit f3dad7f7e55e441303227f412ca3de6fdd61ffcb)