Brazilian President Michel Temer has signed a decree giving the country's military full control of security in Rio de Janeiro in response to spiraling drug gang violence.