always declare O_BINARY

closes #461
Fix ReplaceInkProcessing to work correctly with transparent colors (fix #435)

Now we can replace a solid color with transparent in RGBA and Grayscale
images.
Fix underlinking with USE_SHARED_ALLEGRO4=ON
Merge pull request #497 from Mailaender/patch-2

Fix error: 'O_BINARY' was not declared in this scope (close #461)
Merge pull request #516 from hasufell/underlinking_fix

Link with platforms libs when USE_SHARED_ALLEGRO4=ON (fix #513, #514)
Fix problems with multiple editors in MovingPixelsState (fix #419)
Fix #392 - Crash when another monitor is plugged in

When we change the number of monitors, we've to restore the primary
DirectDraw surface, but it cannot be just "restored", it must be
re-created.

Note: probably the real fix for #436 too
Merge branch '1.0'

Conflicts:
	src/app/color_utils.cpp
	src/app/tools/ink_processing.h
Fix more OS X cursor issues

Fixed problems with a hidden mouse cursor when we activated Aseprite
window from other windows, or from the Mission Control, or with Cmd+Alt.
Remove unused variable
Add support to serialize special unicode chars in ui::Accelerator
Change the way ProgramOptions store specified args

Now we can parse command line arguments sequentially in the same order they
were specified.
Fix UIConext::isUiAvailable() for batch mode
Fix SkinTheme::paintMenuItem() for non AppMenuItem items (e.g. app::NotificationItem)
Add more command line options to export or convert sprites

Added --save-as, --scale, --split-layers, and --import-layer command line
options.
Add --sheet-width and --sheet-height command line options to specify the texture size
Fix formatted output of ProgramOptions when one option has multilines
Add static_assert() to check that Pixman constants match gfx::Region::Overlap
Add gfx/rect_io.h
Add gfx::PackingRects class for packing multiple rectangles in a texture