A systematic study of X-ray variability in the ROSAT all-sky survey