Fix bug when calling non-Bayesian smoother after Bayesian estimation

Because xparam1 is used by the smoother, but xparam was set to the posterior mean, the non-Bayesian smoother results were based on the parameters at the mode, which are stored in xparam1.
Fix message in dynare_estimation_init.m

If some parameters are NaN after computing the steady state, the message erroneously said that parameters had been changed. In a check for equality, NaN is not equal to NaN. Thus, NaNs are now taken care of separately.
Condition singularity warning on unit root check

When singularity is detected, try to compute eigenvalues to see if unit root is present and issue warning according to this check
Allow for check of Hessian at order>2 in model_diagnostics.m
Fix computation of objective function in OSR if covariances are specified

Due to the preprocessor adding entries for all variable combination into i_var, variables contained in covariances obtained a wrong weighting. By only selecting the unique entries, this cannot happen anymore. Moreover, the computation intensity of the objective does not increase quadratically in the objective anymore.
Add unit test to check whether objective function matches and whether covariances actually work
Fix typo in manual
Add reordering of second order derivatives to stochastic_solvers.m

It was erroneously completely moved to dyn_second_order_solver.m in the 4.3 branch when cleaning up dr1.m. Without this reordering, decision rules for exogenous deterministic variables at second order are wrong
Transform objective function in osr to full matrix

If the objective function only has one element, the scalar product of a sparse matrix and a full matrix is sparse (in contrast to two or more elements). This crashes the osr code subsequently.
Fix bug in osr where moments were not based on optimal parameter draw

M_.params is global and was set by csminwel1 to the last value tested; this does not necessarily coincide with the optimal parameter vector, which may have occurred earlier. This commit explicitly sets the optimal parameter vector.
Computation of the loss function in the presence of unit root variables was incorrect

Some elements were simply left out. This commit now mimics the computations as in th_autocovariances.m and makes sure the loss function coincides with the one that is obtained by reading out the covariance from oo_.var
Add unit test for correct computation of loss function in the presence of non-stationary variables
The naming of the resulting SA restrictions files (Smirnov statistics plots) changed so that the file names shows the endogenous variable and shock name of interest. E.g. If the model file name is ls2003a.mod the file name of the plot may be
ls2003a_prior_irf_calib_y_VS_e_ys_SA_1 showing the endogenous variable name y and shock e_ys.
Added legends for the figures.
Merge remote-tracking branch 'remotes/personal/gsa' into gsa
1) Added new improved plotting utility for Monte Carlo filtering tests: scatter_mcf.m;
2) fixed graphical and printed output for prior stab_map_.m;
3) use corrcoef for pvalue and change default pvalue_corr, alpha2_redform, alpha2_rmse to 1.e-5
1) Forced nodisplay to avoid proliferation of plots;
2) added waitbar;
Merge remote-tracking branch 'remotes/personal/gsa' into gsa
Added new Monte Carlo filtering utility, factorizing all Smirnov and correlation tests and plots.
provisions for using new mcf_analysis.m