imagebox: Don't try to scale by infinite (FS#1248)

When an imagebox was drawn with width or height zero, it tried to calculate the
needed scale factor for making the image fit. Sadly, this would be a division by
zero aka infinite in this case.

Fix this by just not drawing anything if there is no space available.

Signed-off-by: Uli Schlachter <psychon@znc.in>
gears.color: Handle nil arguments correctly again

Signed-off-by: Uli Schlachter <psychon@znc.in>
Allow reversing the icon order in systray

Signed-off-by: Uli Schlachter <psychon@znc.in>
README: add 'Reporting issues' section and formatting
Move README to README.md

This triggers proper syntax highlighting, also with Github.
Move 'surface_size' to gears.surface and make it public
Make sure gears.color.create_png_pattern are being repeated
Merge remote-tracking branch 'blueyed/README'
naughty: Don't use the cache when loading icons (FS#1253)

Signed-off-by: Uli Schlachter <psychon@znc.in>
gears.surface: Handle the cache more intelligently

It doesn't make sense for surface.load_uncached() to load a file without
inserting into the cache. The next "cached" load will have to load it again.

So move cache insertion into surface.load_uncached() and the only thing that
surface.load() does differently is checking if we have a suitable cache entry
before calling load_uncached().

So load_uncached() does the cache insertion and load() reads from the cache.

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.tag.move: Fix tag index setting (FS#1249)

Since commit 9c69e857edb6, awful.tag.setscreen() unsets a tag's index to make
sure things end up in a sane order on the new screen. Thus, the call to
setscreen() removed the "index" property that tag.move just set.

Fix this by setting the index after the screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.tag.setscreen: Check if old_screen == new_screen (FS#1249)

Setting a tag's screen to what it already is shouldn't have any bad effects.
However, this code messed up the tag order and selection status.

Fix this by returning early if the tag already has the right screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Rename README -> README.md in CMakeLists.txt
Add patch from Uli, source: https://gist.github.com/psychon/10320743
doc, only set current prop in 'persist'
Fix xprop/prop mixup in 'persist'