Add workarounds for ifort 15.0 bug.

The bug relates to passing a C_PTR function result to a BIND(C)
procedure where the associated dummy argument has the VALUE
attribute.  The workaround in all cases has been to rename the
function result variable to a temporary (original name with _tmp
added), add the appropriate declaration for that temporary and then
assign that temporary immediately after the variable that was the
original function result is been defined.
Workarounds for an ICE with ifort 15.0

The ice is associated with a C_PTR argument being passed from a
main program through an external procedure to the gtk_widget_queue_draw
function.  The workaround is to replace the argument with a module
variable.  Once the ICE is fixed the module can be removed and the
module variable changed back to being a local variable of the program
and an argument of the external procedure.
Fix off by one error.
Merge branch 'std-fixes' into gtk3
Merge branch 'ifort-function-result-bug-workaround' into gtk3