Fix erroneous size_t-to-int truncation.

Twice in `src/formula_function.cpp`, the result of `std::string::find`
was stored in an `int`, which was then compared for inequality with
`std::string::npos`. This was erroneous because both `std::string::npos`
and the result of `std::string::find` are of type `size_t`, so, on a
platform where `sizeof(size_t) > sizeof(int)`, the result of
`std::string::find` would be truncated to the size of an `int`, and no
mere `int` could ever equal `std::string::npos`, so the comparison would
always be true, even when it should have been false.
Fix another erroneous size_t-to-int truncation.

The result of `std::string::rfind` (a `size_t`) was stored in an `int`,
potentially resulting in an erroneous truncation, which would result in
the subsequent comparisons with `std::string::npos` also being
erroneous.

See also commit 9bf7c10644dd7134f9f4262582a5641948d24696.

Oddly, only six lines earlier in the same function, the result of
`std::string::find` was correctly stored in a `size_t`.
Fix erroneous inequality tests.

In `surface_scaling.cpp`, the expression `!color==3` was used twice.
`!color` (`color` is an `int`, so this is a `bool`) could never equal
`3`, so I am almost certain this is an error, and have changed both
instances of this expression to `color != 3`.
Merge pull request #1 from 8573/8573-bugfixes

Fix some bugs.