World military spending tops $1 trillion