Fix #1669 and #1670 - announcements no permission error and wrong $unvie...

...wablefids

Merged arrays with unviewable fids so that all are considered now:
https://github.com/mybb/mybb/issues/1669

And corrected variable in 2 conditionals to fix this:
https://github.com/mybb/mybb/issues/1670
Not saying it isn't, but:
- we're using `array_map('intval')` in many places in MyBB
- the earlier foreaches didn't work as intended

But talking about optimisations, I'll remove it completely since casting the values to integers is not needed at all anyways - it's used only in `in_array()` comparisons, the queries use `$flist` and `$tflist`